2022-04-22 14:54:27 +02:00
|
|
|
"
|
|
|
|
" ~/.vimrc
|
|
|
|
"
|
|
|
|
|
|
|
|
filetype on
|
|
|
|
filetype plugin on
|
|
|
|
filetype indent on
|
|
|
|
set expandtab
|
2022-04-26 16:31:05 +02:00
|
|
|
set smarttab
|
|
|
|
set smartindent
|
2022-04-22 14:54:27 +02:00
|
|
|
set incsearch
|
|
|
|
set showmatch
|
|
|
|
set title
|
|
|
|
set wildignore=*.docx,*.jpg,*.png,*.gif,*.pdf,*.pyc,*.exe,*.flv,*.img,*.xlsx
|
2022-06-02 15:50:03 +02:00
|
|
|
syntax enable
|
2022-04-22 14:54:27 +02:00
|
|
|
|
2022-06-29 17:44:02 +02:00
|
|
|
" --
|
|
|
|
|
|
|
|
set scrolloff=3
|
|
|
|
set showcmd
|
|
|
|
|
|
|
|
set autoindent
|
|
|
|
set linebreak
|
|
|
|
set shiftwidth=4
|
|
|
|
set tabstop=4
|
|
|
|
|
|
|
|
set number
|
|
|
|
set relativenumber
|
|
|
|
|
2022-10-26 00:12:15 +02:00
|
|
|
" colorscheme nord-light
|
2022-06-29 17:44:02 +02:00
|
|
|
set conceallevel=2
|
|
|
|
|
|
|
|
" Add mouse support
|
|
|
|
set mouse=a
|
|
|
|
if $TERM == 'alacritty'
|
|
|
|
set ttymouse=sgr " Alacritty specific
|
|
|
|
endif
|
2022-06-04 22:47:22 +02:00
|
|
|
|
2022-04-22 14:54:27 +02:00
|
|
|
" PLUGINS --------------------------------------------------------------- {{{
|
|
|
|
|
|
|
|
call plug#begin('~/.vim/plugged')
|
|
|
|
|
|
|
|
Plug 'dense-analysis/ale'
|
2022-06-02 15:50:03 +02:00
|
|
|
Plug 'https://github.com/vifm/vifm.vim.git'
|
2022-04-22 14:54:27 +02:00
|
|
|
|
|
|
|
call plug#end()
|
|
|
|
|
|
|
|
" }}}
|
|
|
|
|
2022-06-29 17:44:02 +02:00
|
|
|
" AUTOMATIC STUFF ------------------------------------------------------- {{{
|
|
|
|
|
2022-04-22 14:54:27 +02:00
|
|
|
if has("autocmd")
|
2022-06-02 15:50:03 +02:00
|
|
|
|
|
|
|
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
|
2022-06-04 22:47:22 +02:00
|
|
|
|
|
|
|
" https://stackoverflow.com/a/37558470/19044747
|
|
|
|
augroup remember_folds
|
|
|
|
autocmd!
|
2022-06-29 17:44:02 +02:00
|
|
|
autocmd BufWinLeave * silent! mkview
|
2022-06-04 22:47:22 +02:00
|
|
|
autocmd BufWinEnter * silent! loadview
|
|
|
|
augroup END
|
2022-06-29 17:44:02 +02:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
" }}}
|
2022-04-22 14:54:27 +02:00
|
|
|
|
2022-06-02 15:50:03 +02:00
|
|
|
" TALK ------------------------------------------------------------------ {{{
|
|
|
|
" https://youtu.be/XA2WjJbmmoM ----------------------------------------------
|
|
|
|
|
2022-06-29 17:44:02 +02:00
|
|
|
set nocompatible
|
|
|
|
|
2022-06-02 15:50:03 +02:00
|
|
|
" Finding files using :find <name>
|
|
|
|
set path+=**
|
|
|
|
" Also use :b to select files in buffer
|
|
|
|
|
|
|
|
" Show suggestions on another line instead of inplace
|
|
|
|
set wildmenu
|
|
|
|
|
|
|
|
" Tags
|
|
|
|
" pacman -S ctags
|
|
|
|
command! MakeTags !ctags -R . &
|
|
|
|
" Move to defintion using ^]
|
|
|
|
" Move to ambigious using g^]
|
|
|
|
" Move back using ^t
|
|
|
|
|
2022-06-04 22:47:22 +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-06-02 15:50:03 +02:00
|
|
|
" Autocomplete
|
|
|
|
" Also see https://vimhelp.org/options.txt.html#%27complete%27
|
|
|
|
" ^n next
|
|
|
|
" ^p previous
|
|
|
|
" ^x^f filename completion
|
|
|
|
|
2022-06-29 17:44:02 +02:00
|
|
|
" }}}
|