vimrc: refactorized, showing trailing whitespace
* vim-airline, vim-gitgutter, vim-NERDTree, vim-fugitive plugins have been added system-wide, so removed from the config * trailing whitespace is from now on shown and nicely highlighted using "•" * when empty vim is open, NERDTree is shown
This commit is contained in:
parent
1648ad0b4a
commit
8ae8783963
65
vimrc
65
vimrc
@ -27,32 +27,39 @@ endif
|
|||||||
|
|
||||||
call plug#begin()
|
call plug#begin()
|
||||||
Plug 'drewtempelmeyer/palenight.vim'
|
Plug 'drewtempelmeyer/palenight.vim'
|
||||||
Plug 'https://github.com/suan/vim-instant-markdown', {'for': 'markdown'}
|
Plug 'https://github.com/suan/vim-instant-markdown', { 'for': 'markdown' }
|
||||||
|
Plug 'lervag/vimtex', { 'for': 'tex' }
|
||||||
|
Plug 'xuhdev/vim-latex-live-preview', { 'for': 'tex' }
|
||||||
Plug 'https://tpope.io/vim/surround.git'
|
Plug 'https://tpope.io/vim/surround.git'
|
||||||
Plug 'https://github.com/tpope/vim-repeat.git'
|
Plug 'https://github.com/tpope/vim-repeat.git'
|
||||||
Plug 'https://github.com/tpope/vim-fugitive.git'
|
"Plug 'https://github.com/tpope/vim-fugitive.git'
|
||||||
Plug 'airblade/vim-gitgutter'
|
|
||||||
Plug 'rhysd/open-pdf.vim'
|
|
||||||
"Plug 'voldikss/vim-mma'
|
"Plug 'voldikss/vim-mma'
|
||||||
Plug 'roxma/nvim-yarp'
|
Plug 'roxma/nvim-yarp'
|
||||||
Plug 'roxma/vim-hug-neovim-rpc'
|
Plug 'roxma/vim-hug-neovim-rpc'
|
||||||
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
|
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
|
let g:airline_powerline_fonts = 1
|
||||||
|
let g:Powerline_symbols = "fancy" " sth like this probably set as a default but won't hurt here
|
||||||
|
let g:airline_highlighting_cache = 1
|
||||||
|
|
||||||
|
let g:NERDTreeDirArrowExpandable = '▸'
|
||||||
|
let g:NERDTreeDirArrowCollapsible = '▾'
|
||||||
|
|
||||||
let g:gitgutter_terminal_reports_focus=0
|
let g:gitgutter_terminal_reports_focus=0
|
||||||
"let g:gitgutter_async = 0
|
"let g:gitgutter_async = 0
|
||||||
|
let g:gitgutter_sign_allow_clobber=0
|
||||||
let g:pdf_convert_on_edit = 1
|
|
||||||
let g:pdf_convert_on_read = 1
|
|
||||||
|
|
||||||
let g:deoplete#enable_at_startup = 1
|
let g:deoplete#enable_at_startup = 1
|
||||||
|
|
||||||
|
let g:livepreview_cursorhold_recompile = 0
|
||||||
|
|
||||||
" vim-instant-markdown options
|
" vim-instant-markdown options
|
||||||
let g:instant_markdown_allow_unsafe_content = 1
|
""let g:instant_markdown_allow_unsafe_content = 1
|
||||||
let g:instant_markdown_mathjax = 1
|
""let g:instant_markdown_mathjax = 1
|
||||||
let g:instant_markdown_browser = "chromium-browser --incognito"
|
""let g:instant_markdown_browser = "chromium-browser --incognito"
|
||||||
let g:instant_markdown_autoscroll = 1
|
""let g:instant_markdown_autoscroll = 1
|
||||||
let g:instant_markdown_autostart = 1
|
""let g:instant_markdown_autostart = 1
|
||||||
|
|
||||||
|
|
||||||
" change cursor shape for different editing modes, neovim does this by default
|
" change cursor shape for different editing modes, neovim does this by default
|
||||||
@ -72,8 +79,16 @@ command! W execute 'silent w !sudo tee % >/dev/null' | edit!
|
|||||||
|
|
||||||
" open a terminal in $PWD
|
" open a terminal in $PWD
|
||||||
nnoremap <silent> <Leader>tt :terminal<CR>
|
nnoremap <silent> <Leader>tt :terminal<CR>
|
||||||
|
" toggle showing whitespace
|
||||||
|
noremap <F5> :set list!<CR>
|
||||||
|
|
||||||
|
vmap gb :<C-U>!git blame % -L<C-R>=line("'<") <CR>,<C-R>=line("'>") <CR><CR>
|
||||||
|
nmap gb :!git blame %<CR>
|
||||||
|
|
||||||
" ------ autocmd ------
|
" ------ autocmd ------
|
||||||
|
" automatically open NERDTree if vim is open on it's own (argc() ==0 )
|
||||||
|
autocmd StdinReadPre * let s:std_in=1
|
||||||
|
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
|
||||||
|
|
||||||
" Reload changes if file changed outside of vim requires autoread
|
" Reload changes if file changed outside of vim requires autoread
|
||||||
augroup load_changed_file
|
augroup load_changed_file
|
||||||
@ -124,8 +139,8 @@ augroup vimrc
|
|||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
""" autosave and load views
|
""" autosave and load views
|
||||||
""au BufWinLeave ?* mkview
|
au BufWinLeave ?* mkview
|
||||||
""au BufWinEnter ?* silent loadview
|
au BufWinEnter ?* silent loadview
|
||||||
|
|
||||||
au FileType xml setlocal shiftwidth=2 tabstop=2
|
au FileType xml setlocal shiftwidth=2 tabstop=2
|
||||||
|
|
||||||
@ -151,6 +166,8 @@ nnoremap <silent> <Leader>ss
|
|||||||
\ call setpos('.', b:_p) <Bar>
|
\ call setpos('.', b:_p) <Bar>
|
||||||
\ unlet b:_p <CR>
|
\ unlet b:_p <CR>
|
||||||
|
|
||||||
|
match Todo /\s\+$/
|
||||||
|
|
||||||
|
|
||||||
set softtabstop=4
|
set softtabstop=4
|
||||||
set tabstop=4
|
set tabstop=4
|
||||||
@ -172,17 +189,16 @@ filetype indent plugin off
|
|||||||
set autoindent
|
set autoindent
|
||||||
set backspace=2
|
set backspace=2
|
||||||
|
|
||||||
set nolist " show/hide tabs and EOL chars (hidden characters)
|
set listchars=trail:•
|
||||||
"set number " show/hide line numbers (nu/nonu)
|
set list " show/hide tabs and EOL chars (hidden characters)
|
||||||
"set relativenumber " use relative number
|
set confirm " ask confirmation like save before quit.
|
||||||
set confirm " ask confirmation like save before quit.
|
set wildmenu " Tab completion menu when using command mode
|
||||||
set wildmenu " Tab completion menu when using command mode
|
|
||||||
set scrolloff=5 " scroll offset, min lines above/below cursor
|
set scrolloff=5 " scroll offset, min lines above/below cursor
|
||||||
"set scrolljump=5 " jump 5 lines when running out of the screen - NO
|
"set scrolljump=5 " jump 5 lines when running out of the screen - NO
|
||||||
set sidescroll=10 " minimum columns to scroll horizontally
|
set sidescroll=10 " minimum columns to scroll horizontally
|
||||||
set showcmd " show command status
|
set showcmd " show command status
|
||||||
set showmatch " flashes matching parenthese when cursor over the other one
|
set showmatch " flashes matching parenthese when cursor over the other one
|
||||||
set showmode " show editing mode in status (-- INSERT --)
|
set noshowmode " show editing mode in status (-- INSERT --)
|
||||||
set ruler " show cursor position
|
set ruler " show cursor position
|
||||||
set errorbells " bells in terminal
|
set errorbells " bells in terminal
|
||||||
set undolevels=1000 " number of undos stored
|
set undolevels=1000 " number of undos stored
|
||||||
@ -194,14 +210,11 @@ set nofoldenable
|
|||||||
set encoding=utf-8 " important for powerline besides others
|
set encoding=utf-8 " important for powerline besides others
|
||||||
set smartcase " override 'ignorecase' when pattern has upper case characters
|
set smartcase " override 'ignorecase' when pattern has upper case characters
|
||||||
set noscrollbind
|
set noscrollbind
|
||||||
|
set updatetime=1000
|
||||||
|
|
||||||
|
syntax enable
|
||||||
vmap gb :<C-U>!git blame % -L<C-R>=line("'<") <CR>,<C-R>=line("'>") <CR><CR>
|
|
||||||
nmap gb :!git blame %<CR>
|
|
||||||
|
|
||||||
colo palenight " new fav highlighting
|
colo palenight " new fav highlighting
|
||||||
set mouse=a " enable mouse in n,v,i,c,h modes
|
set mouse=a " enable mouse in n,v,i,c,h modes
|
||||||
|
|
||||||
set laststatus=2 " show powerline status bar
|
set laststatus=2 " show powerline status bar
|
||||||
set t_Co=256
|
set t_Co=256
|
||||||
let g:Powerline_symbols = "fancy" " sth like this probably set as a default but won't hurt here
|
|
||||||
|
Loading…
Reference in New Issue
Block a user