current state of things

This commit is contained in:
surtur 2020-02-28 02:06:26 +01:00
parent 26ba85e573
commit b72c55b875
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

102
vimrc

@ -2,7 +2,7 @@ set nocompatible
filetype off "required filetype off "required
"filetype plugin on " required filetype plugin on " required
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>" inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
@ -27,21 +27,33 @@ 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 'jacoborus/tender.vim'
Plug 'suan/vim-instant-markdown', { 'for': 'markdown' }
Plug 'lervag/vimtex', { 'for': 'tex' } Plug 'lervag/vimtex', { 'for': 'tex' }
Plug 'xuhdev/vim-latex-live-preview', { 'for': 'tex' } Plug 'xuhdev/vim-latex-live-preview', { 'for': 'tex' }
Plug 'https://tpope.io/vim/surround.git' Plug 'vim-airline/vim-airline'
Plug 'https://github.com/tpope/vim-repeat.git' Plug 'vim-airline/vim-airline-themes'
"Plug 'https://github.com/tpope/vim-fugitive.git' Plug 'ctrlpvim/ctrlp.vim'
"Plug 'voldikss/vim-mma' Plug 'tpope/vim-surround'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-repeat'
Plug 'Yggdroot/indentLine'
Plug 'cespare/vim-toml'
Plug 'preservim/nerdcommenter'
Plug 'preservim/nerdtree'
Plug 'Xuyuanp/nerdtree-git-plugin'
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' }
Plug 'carlitux/deoplete-ternjs', { 'do': 'npm install tern' }
Plug 'vim-syntastic/syntastic'
call plug#end() call plug#end()
let g:airline_powerline_fonts = 1 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:Powerline_symbols = "fancy" " sth like this probably set as a default but won't hurt here
let g:airline_highlighting_cache = 1 let g:airline_highlighting_cache = 1
let g:airline_section_z = airline#section#create(['windowswap', '%3p%% ', 'linenr', ':%3v'])
let g:airline_theme = 'tender'
let g:NERDTreeDirArrowExpandable = '▸' let g:NERDTreeDirArrowExpandable = '▸'
let g:NERDTreeDirArrowCollapsible = '▾' let g:NERDTreeDirArrowCollapsible = '▾'
@ -50,22 +62,66 @@ 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:gitgutter_sign_allow_clobber=0
let g:deoplete#enable_at_startup = 1 let g:deoplete#enable_at_startup = 0
let g:livepreview_cursorhold_recompile = 0 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
" Add spaces after comment delimiters by default
let g:NERDSpaceDelims = 1
" Allow commenting and inverting empty lines (useful when commenting a region)
let g:NERDCommentEmptyLines = 1
" Enable trimming of trailing whitespace when uncommenting
let g:NERDTrimTrailingWhitespace = 1
"""" Enable NERDCommenterToggle to check all selected lines is commented or not
"""let g:NERDToggleCheckAllLines = 1
" Add your own custom formats or override the defaults
let g:NERDCustomDelimiters = { 'vim': { 'left': '"','right': '' }, 'c': { 'left': '/**','right': '*/' } }
"let g:indentLine_setColors = 0
let g:indentLine_char_list = ['|', '¦', '┆', '┊', ':']
let g:syntastic_always_populate_loc_list = 0
let g:syntastic_auto_loc_list = 2
let g:syntastic_loc_list_height = 8
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_aggregate_errors = 1
let g:syntastic_id_checkers = 1
let g:syntastic_error_symbol = "✗"
let g:syntastic_warning_symbol = "⚠"
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_javascript_checkers = ['jsl']
let g:syntastic_python_checkers = ['pylint']
let g:syntastic_c_compiler = 'gcc'
let g:syntastic_c_check_header = 1
let g:syntastic_c_auto_refresh_includes = 1
let g:syntastic_cpp_check_header = 1
let g:syntastic_cpp_auto_refresh_includes = 1
let g:syntastic_c_cpplint_exec = 'cppcheck'
" Use tern_for_vim.
" let g:tern#command = ["tern"]
" let g:tern#arguments = ["--persistent"]
" let g:deoplete#sources#ternjs#timeout = 1
" Whether to include the types of the completions in the result data. Default: 0
" let g:deoplete#sources#ternjs#types = 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
if !has('nvim') if !has('nvim')
if exists('$TMUX') if exists('$TMUX')
let &t_SI = "\<Esc>Ptmux;\<Esc>\e[5 q\<Esc>\\" let &t_SI = "\<Esc>Ptmux;\<Esc>\e[2 q\<Esc>\\"
let &t_SR = "\<Esc>Ptmux;\<Esc>\e[4 q\<Esc>\\" let &t_SR = "\<Esc>Ptmux;\<Esc>\e[4 q\<Esc>\\"
let &t_EI = "\<Esc>Ptmux;\<Esc>\e[2 q\<Esc>\\" let &t_EI = "\<Esc>Ptmux;\<Esc>\e[2 q\<Esc>\\"
else else
@ -76,11 +132,16 @@ if !has('nvim')
endif endif
command! W execute 'silent w !sudo tee % >/dev/null' | edit! command! W execute 'silent w !sudo tee % >/dev/null' | edit!
command! -nargs=* Make write | make! <args> | cwindow
" 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 " toggle showing whitespace
noremap <F5> :set list!<CR> noremap <F5> :set list!<CR>
" make shortcut
nnoremap <F4> :make!<cr>
" NERDTree
nmap <Leader>nt :NERDTreeToggle<CR>
vmap gb :<C-U>!git blame % -L<C-R>=line("'<") <CR>,<C-R>=line("'>") <CR><CR> vmap gb :<C-U>!git blame % -L<C-R>=line("'<") <CR>,<C-R>=line("'>") <CR><CR>
nmap gb :!git blame %<CR> nmap gb :!git blame %<CR>
@ -143,6 +204,10 @@ 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
au FileType html setlocal shiftwidth=2 tabstop=2
au BufNewFile,BufRead *.js
\ setlocal shiftwidth=2 tabstop=2 softtabstop=2 expandtab autoindent fileformat=unix
au FileType c setl ofu=ccomplete#CompleteCpp au FileType c setl ofu=ccomplete#CompleteCpp
au BufNewFile,BufRead *.py,*.pyw,*.pyx,?akefil* au BufNewFile,BufRead *.py,*.pyw,*.pyx,?akefil*
@ -180,16 +245,16 @@ set errorformat+=%.%#PHP:\ %m\ \(in\ %f\ on\ line\ %l\)%.%#,
autocmd BufNewFile,BufRead svn-commit.*tmp :0r $SVN_COMMIT_TEMPLATE autocmd BufNewFile,BufRead svn-commit.*tmp :0r $SVN_COMMIT_TEMPLATE
set tags=tags;/ set tags=.tags;
set incsearch " incrimental search set incsearch " incrimental search
set hlsearch " highlighting when searching set hlsearch " highlighting when searching
filetype indent plugin off filetype indent plugin on
set autoindent set autoindent
set backspace=2 set backspace=2
set listchars=trail:• set listchars=trail:•,tab:>-
set list " show/hide tabs and EOL chars (hidden characters) set list " show/hide tabs and EOL chars (hidden characters)
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
@ -208,12 +273,13 @@ set nofoldenable
"set foldmethod=indent " indent based folding "set foldmethod=indent " indent based folding
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 ignorecase " searches are case insensitive...
set smartcase " ... unless they contain at least one capital letter
set noscrollbind set noscrollbind
set updatetime=1000 set updatetime=1000
syntax enable syntax enable
colo palenight " new fav highlighting colo tender " 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