[nvim] Add stuff, deactivate some plugins
This commit is contained in:
parent
4772d05d9d
commit
bb22bfb6df
1 changed files with 58 additions and 21 deletions
|
@ -109,19 +109,23 @@ nnoremap <leader>y "+y | vnoremap <leader>p "+p
|
|||
nnoremap <leader>yy "+yy | vnoremap <leader>P "+P
|
||||
|
||||
" Opening windows {{{2
|
||||
nnoremap <C-j> <C-w>n
|
||||
nmap <C-k> <C-w>N
|
||||
nnoremap <C-l> <C-w>v
|
||||
nmap <C-h> <C-w>V
|
||||
nnoremap <C-j> <C-w>j
|
||||
nnoremap <C-k> <C-w>k
|
||||
nnoremap <C-l> <C-w>l
|
||||
nnoremap <C-h> <C-w>h
|
||||
|
||||
imap <C-w> <esc><C-w>
|
||||
vmap <C-w> <esc><C-w>
|
||||
|
||||
nnoremap <C-b> <C-w>n
|
||||
nnoremap <C-n> <C-w>v
|
||||
nnoremap <C-c> <C-w>q
|
||||
|
||||
nnoremap <silent> <C-w>v :vnew<CR>
|
||||
nnoremap <silent> <C-w>V :let spr=&spr<BAR>set nospr<BAR>vnew<BAR>let &spr=spr<CR>
|
||||
nnoremap <silent> <C-w>N :let spr=&spr<BAR>set nospr<BAR>new<BAR>let &spr=spr<CR>
|
||||
|
||||
" Cool arrows {{{2
|
||||
" Cool characters {{{2
|
||||
inoremap <leader>akl ↗ | inoremap <leader>alk ↗
|
||||
inoremap <leader>ajl ↘ | inoremap <leader>alj ↘
|
||||
inoremap <leader>ajh ↙ | inoremap <leader>ahj ↙
|
||||
|
@ -145,6 +149,17 @@ inoremap <leader>aakh ⇖ | inoremap <leader>aahk ⇖
|
|||
inoremap <leader>aajk ⇕ | inoremap <leader>aakj ⇕
|
||||
inoremap <leader>aahl ⇔ | inoremap <leader>aalh ⇔
|
||||
|
||||
inoremap <leader>forall ∀
|
||||
inoremap <leader>exists ∃
|
||||
inoremap <leader>nexists ∄
|
||||
inoremap <leader>_\|_ ⊥
|
||||
inoremap <leader>-\|- ⊤
|
||||
inoremap <leader>\|- ⊢
|
||||
inoremap <leader>-\| ⊣
|
||||
inoremap <leader>int ∫
|
||||
inoremap <leader>sum ∑
|
||||
|
||||
|
||||
" Default visual block {{{2
|
||||
nnoremap v <C-v>
|
||||
nnoremap <C-v> v
|
||||
|
@ -174,6 +189,7 @@ augroup END
|
|||
" ======================
|
||||
set undodir=/tmp/vim-undodir
|
||||
set undofile
|
||||
set directory^=/tmp/vim-swapfile//
|
||||
|
||||
|
||||
" Plug-ins {{{1
|
||||
|
@ -183,9 +199,10 @@ set undofile
|
|||
" ------------
|
||||
call plug#begin('~/.config/nvim/plug')
|
||||
|
||||
" Colors
|
||||
" View
|
||||
"Plug 'chriskempson/base16-vim'
|
||||
Plug 'rakr/vim-one'
|
||||
"Plug 'Yggdroot/indentLine' " display the indention levels with thin vertical lines
|
||||
|
||||
" Language support
|
||||
Plug 'sheerun/vim-polyglot' " color, indentation support for 100+ languages
|
||||
|
@ -193,7 +210,7 @@ call plug#begin('~/.config/nvim/plug')
|
|||
"Plug 'neovimhaskell/haskell-vim', { 'for': 'haskell' } " included in vim-polyglot
|
||||
"Plug 'LaTeX-Box-Team/LaTeX-Box', { 'for': 'tex' } " included in vim-polyglot
|
||||
"Plug 'rust-lang/rust.vim', { 'for': 'rust' } " included in vim-polyglot
|
||||
Plug 'ap/vim-css-color' " CSS color names
|
||||
"Plug 'ap/vim-css-color' " CSS color names
|
||||
|
||||
" C/C++
|
||||
"Plug 'vim-scripts/c.vim', { 'for': ['c', 'cpp', 'objc'] } " various IDE-like C features
|
||||
|
@ -215,21 +232,20 @@ call plug#begin('~/.config/nvim/plug')
|
|||
Plug 'junegunn/vim-easy-align' " easily align text in Alexander Approved™ ways
|
||||
Plug 'matze/vim-move' " move lines and selections up and down
|
||||
"Plug 'kana/vim-operator-user' " define your own operator easily
|
||||
Plug 'junegunn/vim-peekaboo' " preview registers when pressing \" or @
|
||||
"Plug 'junegunn/vim-peekaboo' " preview registers when pressing \" or @
|
||||
Plug 'gcmt/wildfire.vim' " smart selection of the closest text object
|
||||
Plug 'Valloric/YouCompleteMe', { 'do': 'git submodule update --init --recursive && ./install.py --system-libclang --all' } " code-completion engine
|
||||
|
||||
" Navigation
|
||||
Plug 'ctrlpvim/ctrlp.vim' " fuzzy file, buffer, mru, tag, etc. finder
|
||||
"Plug 'ctrlpvim/ctrlp.vim' " fuzzy file, buffer, mru, tag, etc. finder
|
||||
Plug 'dyng/ctrlsf.vim' " search for code, edit it in-place, have multiple cursors
|
||||
Plug 'Yggdroot/indentLine' " display the indention levels with thin vertical lines
|
||||
Plug 'scrooloose/nerdtree' " filesystem tree explorer
|
||||
Plug 'majutsushi/tagbar' " display tags in a window, ordered by scope
|
||||
"Plug 'majutsushi/tagbar' " display tags in a window, ordered by scope
|
||||
Plug 'easymotion/vim-easymotion' " quickly jump to any location on the screen
|
||||
Plug 'airblade/vim-gitgutter' " show a Git diff in the gutter, stage/undo hunks
|
||||
Plug 'mhinz/vim-grepper', { 'on': 'Grepper' } " asynchronous git grep search
|
||||
"Plug 'mhinz/vim-grepper', { 'on': 'Grepper' } " asynchronous git grep search
|
||||
"Plug 'ludovicchabant/vim-gutentags' " unobtrusively manage tag files
|
||||
Plug 'tpope/vim-obsession' " continuously updated session files
|
||||
"Plug 'tpope/vim-obsession' " continuously updated session files
|
||||
|
||||
" Powerline
|
||||
Plug 'vim-airline/vim-airline' " statusline plugin in pure Vimscript
|
||||
|
@ -239,6 +255,7 @@ call plug#begin('~/.config/nvim/plug')
|
|||
" Analysis
|
||||
Plug 'w0rp/ale' " asynchronous linting engine
|
||||
"Plug 'dbmrq/vim-ditto' " highlight overused words
|
||||
Plug 'janko-m/vim-test' " testing
|
||||
|
||||
" Misc
|
||||
Plug 'editorconfig/editorconfig-vim' " per-project modeline-like configuration
|
||||
|
@ -304,10 +321,10 @@ let g:DoxygenToolkit_authorName="Midgard"
|
|||
" FSwitch {{{2
|
||||
" ------------
|
||||
let b:fswitchdst = ''
|
||||
au! BufEnter *.cpp let b:fswitchdst = 'hpp,h' | let b:fswitchlocs = '.'
|
||||
au! BufEnter *.hpp let b:fswitchdst = 'cpp' | let b:fswitchlocs = '.'
|
||||
au! BufEnter *.c let b:fswitchdst = 'h' | let b:fswitchlocs = '.'
|
||||
au! BufEnter *.h let b:fswitchdst = 'c,cpp' | let b:fswitchlocs = '.'
|
||||
au! BufEnter *.cpp let b:fswitchdst = 'hpp,h' | let b:fswitchlocs = '.,reg:/src/include/'
|
||||
au! BufEnter *.hpp let b:fswitchdst = 'cpp' | let b:fswitchlocs = '.,reg:/include/src/'
|
||||
au! BufEnter *.c let b:fswitchdst = 'h' | let b:fswitchlocs = '.,reg:/src/include/'
|
||||
au! BufEnter *.h let b:fswitchdst = 'c,cpp' | let b:fswitchlocs = '.,reg:/include/src/'
|
||||
nmap <silent> <F2> :FSRight<cr>
|
||||
|
||||
" Protodef {{{2
|
||||
|
@ -420,7 +437,7 @@ let g:ctrlsf_regex_pattern = 1
|
|||
|
||||
" NERDTree {{{2
|
||||
" -------------
|
||||
nnoremap <silent> <leader>t :NERDTreeToggle<CR>
|
||||
nnoremap <silent> <leader>T :NERDTreeToggle<CR>
|
||||
nnoremap <silent> ² :NERDTreeFind<CR>
|
||||
let NERDTreeIgnore=[
|
||||
\ "^__pycache__$",
|
||||
|
@ -494,6 +511,10 @@ let g:gutentags_cache_dir = '~/.cache/gutentag'
|
|||
" Obsession {{{2
|
||||
" --------------
|
||||
|
||||
" Choosewin {{{2
|
||||
" --------------
|
||||
"
|
||||
|
||||
" Airline {{{2
|
||||
" ------------
|
||||
let g:airline_powerline_fonts=1
|
||||
|
@ -505,17 +526,33 @@ let g:airline#extensions#ale#enabled=1
|
|||
" Ale {{{2
|
||||
" --------
|
||||
let g:ale_linters = {
|
||||
\ 'c': [],
|
||||
\ 'cpp': [],
|
||||
\ 'c': [],
|
||||
\ 'cpp': [],
|
||||
\}
|
||||
let g:ale_lint_on_text_change='normal'
|
||||
let g:ale_lint_on_insert_leave=1
|
||||
let g:ale_completion_delay=''
|
||||
let g:ale_lint_delay=500
|
||||
let g:ale_sign_error = '»'
|
||||
let g:ale_sign_warning = '·'
|
||||
"highlight ALEWarning cterm=undercurl gui=undercurl guibg=none guisp=DarkYellow
|
||||
highlight ALEWarning none
|
||||
|
||||
" Ditto {{{2
|
||||
" ----------
|
||||
|
||||
" Test {{{2
|
||||
" ---------
|
||||
|
||||
nmap <silent> <leader>tn :TestNearest<CR>
|
||||
nmap <silent> <leader>tf :TestFile<CR>
|
||||
nmap <silent> <leader>ts :TestSuite<CR>
|
||||
nmap <silent> <leader>tl :TestLast<CR>
|
||||
nmap <silent> <leader>tg :TestVisit<CR>
|
||||
|
||||
let test#strategy = "neovim"
|
||||
|
||||
|
||||
" EditorConfig {{{2
|
||||
" -----------------
|
||||
"
|
||||
|
@ -534,5 +571,5 @@ let g:EditorConfig_core_mode = 'external_command'
|
|||
" TeTrIs {{{2
|
||||
" -----------
|
||||
|
||||
" modeline {{{1
|
||||
" vim: set foldmethod=marker foldlevel=1 et ts=2 sw=2 ft=vim nowrap :
|
||||
|
||||
|
|
Loading…
Reference in a new issue