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
57
vimrc
57
vimrc
@ -28,31 +28,38 @@ endif
|
||||
call plug#begin()
|
||||
Plug 'drewtempelmeyer/palenight.vim'
|
||||
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://github.com/tpope/vim-repeat.git'
|
||||
Plug 'https://github.com/tpope/vim-fugitive.git'
|
||||
Plug 'airblade/vim-gitgutter'
|
||||
Plug 'rhysd/open-pdf.vim'
|
||||
"Plug 'https://github.com/tpope/vim-fugitive.git'
|
||||
"Plug 'voldikss/vim-mma'
|
||||
Plug 'roxma/nvim-yarp'
|
||||
Plug 'roxma/vim-hug-neovim-rpc'
|
||||
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
|
||||
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_async = 0
|
||||
|
||||
let g:pdf_convert_on_edit = 1
|
||||
let g:pdf_convert_on_read = 1
|
||||
let g:gitgutter_sign_allow_clobber=0
|
||||
|
||||
let g:deoplete#enable_at_startup = 1
|
||||
|
||||
let g:livepreview_cursorhold_recompile = 0
|
||||
|
||||
" vim-instant-markdown options
|
||||
let g:instant_markdown_allow_unsafe_content = 1
|
||||
let g:instant_markdown_mathjax = 1
|
||||
let g:instant_markdown_browser = "chromium-browser --incognito"
|
||||
let g:instant_markdown_autoscroll = 1
|
||||
let g:instant_markdown_autostart = 1
|
||||
""let g:instant_markdown_allow_unsafe_content = 1
|
||||
""let g:instant_markdown_mathjax = 1
|
||||
""let g:instant_markdown_browser = "chromium-browser --incognito"
|
||||
""let g:instant_markdown_autoscroll = 1
|
||||
""let g:instant_markdown_autostart = 1
|
||||
|
||||
|
||||
" 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
|
||||
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 ------
|
||||
" 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
|
||||
augroup load_changed_file
|
||||
@ -124,8 +139,8 @@ augroup vimrc
|
||||
augroup END
|
||||
|
||||
""" autosave and load views
|
||||
""au BufWinLeave ?* mkview
|
||||
""au BufWinEnter ?* silent loadview
|
||||
au BufWinLeave ?* mkview
|
||||
au BufWinEnter ?* silent loadview
|
||||
|
||||
au FileType xml setlocal shiftwidth=2 tabstop=2
|
||||
|
||||
@ -151,6 +166,8 @@ nnoremap <silent> <Leader>ss
|
||||
\ call setpos('.', b:_p) <Bar>
|
||||
\ unlet b:_p <CR>
|
||||
|
||||
match Todo /\s\+$/
|
||||
|
||||
|
||||
set softtabstop=4
|
||||
set tabstop=4
|
||||
@ -172,9 +189,8 @@ filetype indent plugin off
|
||||
set autoindent
|
||||
set backspace=2
|
||||
|
||||
set nolist " show/hide tabs and EOL chars (hidden characters)
|
||||
"set number " show/hide line numbers (nu/nonu)
|
||||
"set relativenumber " use relative number
|
||||
set listchars=trail:•
|
||||
set list " show/hide tabs and EOL chars (hidden characters)
|
||||
set confirm " ask confirmation like save before quit.
|
||||
set wildmenu " Tab completion menu when using command mode
|
||||
set scrolloff=5 " scroll offset, min lines above/below cursor
|
||||
@ -182,7 +198,7 @@ set scrolloff=5 " scroll offset, min lines above/below cursor
|
||||
set sidescroll=10 " minimum columns to scroll horizontally
|
||||
set showcmd " show command status
|
||||
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 errorbells " bells in terminal
|
||||
set undolevels=1000 " number of undos stored
|
||||
@ -194,14 +210,11 @@ set nofoldenable
|
||||
set encoding=utf-8 " important for powerline besides others
|
||||
set smartcase " override 'ignorecase' when pattern has upper case characters
|
||||
set noscrollbind
|
||||
set updatetime=1000
|
||||
|
||||
|
||||
vmap gb :<C-U>!git blame % -L<C-R>=line("'<") <CR>,<C-R>=line("'>") <CR><CR>
|
||||
nmap gb :!git blame %<CR>
|
||||
|
||||
syntax enable
|
||||
colo palenight " new fav highlighting
|
||||
set mouse=a " enable mouse in n,v,i,c,h modes
|
||||
|
||||
set laststatus=2 " show powerline status bar
|
||||
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