sisyphus/stow/vim/.vimrc

89 lines
1.8 KiB
VimL
Raw Permalink Normal View History

2022-10-26 12:49:01 +02:00
"
" ~/.vimrc
"
2023-10-28 12:49:49 +02:00
source ~/.vim/theme.conf
2024-02-23 08:03:47 +01:00
source ~/.vim/source/python
2023-10-19 21:03:53 +02:00
set autoindent
set conceallevel=2
2022-10-26 12:49:01 +02:00
set expandtab
set incsearch
2023-10-19 21:03:53 +02:00
set linebreak
set mouse=a
set nocompatible
set number
2024-02-23 08:03:47 +01:00
set omnifunc=ale#completion#OmniFunc
2023-10-19 21:03:53 +02:00
set path+=**
set relativenumber
set scrolloff=3
set shiftwidth=4
set showcmd
2022-10-26 12:49:01 +02:00
set showmatch
2023-10-19 21:03:53 +02:00
set smartindent
set smarttab
set tabstop=4
2022-10-26 12:49:01 +02:00
set title
set wildignore=*.docx,*.jpg,*.png,*.gif,*.pdf,*.pyc,*.exe,*.flv,*.img,*.xlsx
2023-10-19 21:03:53 +02:00
"" Show suggestions on another line instead of inplace
set wildmenu
2022-10-26 12:49:01 +02:00
2023-10-19 21:03:53 +02:00
syntax enable
2022-10-26 12:49:01 +02:00
2023-10-19 21:03:53 +02:00
filetype on
filetype indent on
filetype plugin on
2022-10-26 12:49:01 +02:00
2023-10-19 21:03:53 +02:00
" File browsing
let g:netrw_browse_split=4 " open in the previous window
let g:netrw_altv=1 " split new windows to the right
let g:netrw_liststyle=3 " treeview
2022-10-26 12:49:01 +02:00
2023-10-19 21:03:53 +02:00
" Autocomplete
" Also see https://vimhelp.org/options.txt.html#%27complete%27
" ^n next
" ^p previous
" ^x^f filename completion
2022-10-26 12:49:01 +02:00
if $TERM == 'alacritty'
set ttymouse=sgr " Alacritty specific
endif
2023-10-19 21:03:53 +02:00
if $TERM == 'xterm-kitty'
" Fix <HOME> and <END> not working
set term=xterm-256color
endif
2022-10-26 12:49:01 +02:00
" Automatically start vim in a server - enable colorscheme switching
call remote_startserver("VIM")
2023-10-19 21:03:53 +02:00
" AUTO ------------------------------------------------------------------ {{{
2022-10-26 12:49:01 +02:00
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
" https://stackoverflow.com/a/37558470/19044747
augroup remember_folds
autocmd!
autocmd BufWinLeave * silent! mkview
autocmd BufWinEnter * silent! loadview
augroup END
endif
" }}}
2023-10-19 21:03:53 +02:00
" PLUGINS --------------------------------------------------------------- {{{
2022-10-26 12:49:01 +02:00
2024-02-19 07:54:22 +01:00
call plug#begin('~/.vim/plugins')
2022-10-26 12:49:01 +02:00
2023-10-19 21:03:53 +02:00
Plug 'catppuccin/vim', { 'as': 'catppuccin' }
2024-02-23 08:03:47 +01:00
Plug 'dense-analysis/ale'
2023-10-19 21:03:53 +02:00
Plug 'NerdyPepper/statix'
2024-02-23 08:03:47 +01:00
Plug 'prabirshrestha/vim-lsp'
Plug 'sheerun/vim-polyglot'
Plug 'vifm/vifm.vim'
2022-10-26 12:49:01 +02:00
2023-10-19 21:03:53 +02:00
call plug#end()
2022-10-26 12:49:01 +02:00
" }}}
2023-10-19 21:03:53 +02:00