Use neovim if installed

This commit is contained in:
lara 2020-11-20 19:07:46 +01:00
parent b550d51d16
commit c189ae8ae3
3 changed files with 25 additions and 0 deletions

View file

@ -21,6 +21,9 @@ if which sl > /dev/null 2>&1; then
alias l='sl' alias l='sl'
alias lll='sl' alias lll='sl'
fi fi
if which nvim > /dev/null 2>&1; then
alias vim='nvim'
fi
case $(uname -s) in case $(uname -s) in
Arch) Arch)
alias redwm='cd ~/aur/dwm-git; updpkgsums; makepkg -fi --noconfirm; killall dwm' alias redwm='cd ~/aur/dwm-git; updpkgsums; makepkg -fi --noconfirm; killall dwm'

4
config/nvim/init.vim Normal file
View file

@ -0,0 +1,4 @@
" http://vimcasts.org/episodes/meet-neovim/
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath=&runtimepath
source ~/.vimrc

18
vimrc
View file

@ -16,8 +16,10 @@ if has("unix") || has("mac")
"[Run Plug-ins]" "[Run Plug-ins]"
set runtimepath+=$HOME/.vim/bundle/Vundle.vim set runtimepath+=$HOME/.vim/bundle/Vundle.vim
call vundle#begin() call vundle#begin()
Plugin 'gmarik/Vundle.vim' Plugin 'gmarik/Vundle.vim'
map <F3> :VundleUpdate<CR> map <F3> :VundleUpdate<CR>
Plugin 'dag/vim-fish' Plugin 'dag/vim-fish'
if isdirectory(expand("$HOME/.vim/bundle/YouCompleteMe")) if isdirectory(expand("$HOME/.vim/bundle/YouCompleteMe"))
"[Workaround for YCM non-portability]" "[Workaround for YCM non-portability]"
@ -33,6 +35,7 @@ if has("unix") || has("mac")
else else
Plugin 'AutoComplPop' Plugin 'AutoComplPop'
endif endif
Plugin 'w0rp/ale' Plugin 'w0rp/ale'
let g:ale_linters = { let g:ale_linters = {
\ 'cpp': ['g++'], \ 'cpp': ['g++'],
@ -41,16 +44,27 @@ if has("unix") || has("mac")
let g:ale_c_gcc_options='-std=c99 -pedantic' let g:ale_c_gcc_options='-std=c99 -pedantic'
let g:ale_sign_error = '●' let g:ale_sign_error = '●'
let g:ale_sign_warning = '●' let g:ale_sign_warning = '●'
Plugin 'itchyny/lightline.vim' Plugin 'itchyny/lightline.vim'
let g:lightline = {'colorscheme': 'base16_default_dark'} let g:lightline = {'colorscheme': 'base16_default_dark'}
if executable('ctags') if executable('ctags')
Plugin 'ludovicchabant/vim-gutentags' Plugin 'ludovicchabant/vim-gutentags'
endif endif
Plugin 'beyondmarc/opengl.vim' Plugin 'beyondmarc/opengl.vim'
Plugin 'arrufat/vala.vim' Plugin 'arrufat/vala.vim'
let g:vala_syntax_folding_enabled = 0 let g:vala_syntax_folding_enabled = 0
Plugin 'tikhomirov/vim-glsl' Plugin 'tikhomirov/vim-glsl'
Plugin 'jamessan/vim-gnupg' Plugin 'jamessan/vim-gnupg'
Plugin 'machakann/vim-highlightedyank'
let g:highlightedyank_highlight_duration = 200
"[Needed only with old vim versions]"
if !exists('##TextYankPost')
map y <Plug>(highlightedyank)
endif
"[Autodetect indent style of a file]" "[Autodetect indent style of a file]"
Plugin 'tcbbd/detectindent' Plugin 'tcbbd/detectindent'
let g:detectindent_preferred_indent=4 let g:detectindent_preferred_indent=4
@ -141,6 +155,10 @@ set ignorecase
set wrapscan set wrapscan
"[When on, the ":substitute" flag 'g' is default on]" "[When on, the ":substitute" flag 'g' is default on]"
set nogdefault set nogdefault
"[Enable realtime feedback for substitution]"
if has("nvim")
set inccommand=nosplit
endif
"[Kitty doesn't support background color erase]" "[Kitty doesn't support background color erase]"