From bb22bfb6df2e9e3503844500a57bd4dc635471ee Mon Sep 17 00:00:00 2001 From: M1dgard Date: Fri, 1 Mar 2019 17:55:06 +0100 Subject: [PATCH] [nvim] Add stuff, deactivate some plugins --- nvim-init.vim | 79 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 58 insertions(+), 21 deletions(-) diff --git a/nvim-init.vim b/nvim-init.vim index ac237b0..74febc2 100644 --- a/nvim-init.vim +++ b/nvim-init.vim @@ -109,19 +109,23 @@ nnoremap y "+y | vnoremap p "+p nnoremap yy "+yy | vnoremap P "+P " Opening windows {{{2 -nnoremap n -nmap N -nnoremap v -nmap V +nnoremap j +nnoremap k +nnoremap l +nnoremap h imap vmap +nnoremap n +nnoremap v +nnoremap q + nnoremap v :vnew nnoremap V :let spr=&sprset nosprvnewlet &spr=spr nnoremap N :let spr=&sprset nosprnewlet &spr=spr -" Cool arrows {{{2 +" Cool characters {{{2 inoremap akl ↗ | inoremap alk ↗ inoremap ajl ↘ | inoremap alj ↘ inoremap ajh ↙ | inoremap ahj ↙ @@ -145,6 +149,17 @@ inoremap aakh ⇖ | inoremap aahk ⇖ inoremap aajk ⇕ | inoremap aakj ⇕ inoremap aahl ⇔ | inoremap aalh ⇔ +inoremap forall ∀ +inoremap exists ∃ +inoremap nexists ∄ +inoremap _\|_ ⊥ +inoremap -\|- ⊤ +inoremap \|- ⊢ +inoremap -\| ⊣ +inoremap int ∫ +inoremap sum ∑ + + " Default visual block {{{2 nnoremap v nnoremap 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 :FSRight " Protodef {{{2 @@ -420,7 +437,7 @@ let g:ctrlsf_regex_pattern = 1 " NERDTree {{{2 " ------------- -nnoremap t :NERDTreeToggle +nnoremap T :NERDTreeToggle nnoremap ² :NERDTreeFind 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 tn :TestNearest +nmap tf :TestFile +nmap ts :TestSuite +nmap tl :TestLast +nmap tg :TestVisit + +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 : -