vim: Switch to nvim

This commit is contained in:
Simon Bruder 2020-05-17 15:39:31 +02:00
parent 6b7f7ccadf
commit 5d331176cc
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F
3 changed files with 37 additions and 45 deletions

View file

@ -1,5 +1,6 @@
flask
ipython
neovim-remote
pandas
powerline-status
pyppeteer

View file

@ -1,12 +1,39 @@
" Require vim
set nocompatible
" Basic display
set number
set colorcolumn=80
" Persistent undo
set undofile
set undodir=$HOME/.vim/undo
set undolevels=4096
set undoreload=16384
" Search
set ignorecase
" Autoload settings from file
set modeline
" Highlight trailing spaces and spaces before tabs
highlight ExtraWhitespace ctermbg=red guibg=red
autocmd BufWinEnter * match ExtraWhitespace /\s\+$\| \+\ze\t/
" Jump to the last position
if has("autocmd")
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
\| exe "normal! g`\"" | endif
endif
" Plugins
call plug#begin('~/.vim/plugged')
" Features
" Per-project vim settings
Plug 'MarcWeber/vim-addon-local-vimrc'
" Tagbar
Plug 'majutsushi/tagbar'
nmap <F8> :TagbarToggle<CR>
" Snippets
Plug 'SirVer/ultisnips'
let g:UltiSnipsExpandTrigger = '<tab>'
let g:UltiSnipsJumpForwardTrigger = '<tab>'
@ -29,6 +56,7 @@ Plug 'mechatroner/rainbow_csv'
Plug 'posva/vim-vue', { 'for': 'vue' }
Plug 'sirtaj/vim-openscad', { 'for': 'openscad' }
" LaTeX helpers
Plug 'lervag/vimtex'
let g:tex_flavor='latex'
let g:vimtex_view_method='zathura'
@ -47,46 +75,5 @@ command Vtc VimtexCompile
Plug 'altercation/vim-colors-solarized'
call plug#end()
" Basic display
set number
set colorcolumn=80
" Solarized theme
set background=dark
silent! colorscheme solarized
" Persistent undo
set undofile
set undodir=$HOME/.vim/undo
set undolevels=4096
set undoreload=16384
" Search
set hlsearch
set ignorecase
" Autoload settings from file
set modeline
" Highlight trailing spaces and spaces before tabs
highlight ExtraWhitespace ctermbg=red guibg=red
autocmd BufWinEnter * match ExtraWhitespace /\s\+$\| \+\ze\t/
" Tab settings
set autoindent
" Jump to the last position
if has("autocmd")
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
\| exe "normal! g`\"" | endif
endif
" Set gvim font
if has("gui_running")
set guifont=Terminess\ Powerline
endif
" Start clientserver (from vimtex.txt)
if empty(v:servername) && exists('*remote_startserver')
silent! call remote_startserver('VIM')
endif

View file

@ -171,6 +171,10 @@ alias ipy="ipython3"
alias rls="/bin/ls --color=auto"
alias line="chromium --user-data-dir=$HOME/.line --app=chrome-extension://ophjlpahpchlmihnnnihgmmeilfjmjjc/index.html"
alias vim="nvim"
alias vimdiff="nvim -d"
export EDITOR=nvim
## Environment variables
export HVSC_BASE="$HOME/Documents/sound/HVSC/"
export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on" # force antialiasing in java