Advertisement
Guest User

neovimconfig

a guest
Jan 27th, 2020
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. call plug#begin(stdpath('data') . '/plugged')
  2. Plug 'eugen0329/vim-esearch'
  3. Plug 'junegunn/vim-easy-align'
  4. Plug 'WolfgangMehner/c-support'
  5. Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
  6. Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
  7. Plug 'junegunn/fzf.vim'
  8. Plug 'ap/vim-buftabline'
  9. "Plug 'Chiel92/vim-autoformat'
  10. Plug 'mhinz/vim-sayonara', { 'on': 'Sayonara' }
  11.  
  12. call plug#end()
  13. set expandtab
  14. set shiftwidth=3
  15. set tabstop=3
  16. "set autoindent "is on by default
  17. set smartindent
  18.  
  19. "let g:C_MapLeader = ","
  20. ":let mapleader = "\<Space>"
  21. :let mapleader = "\,"
  22. set hidden
  23. nnoremap <C-N> :bnext<CR>
  24. nnoremap <C-P> :bprev<CR>
  25. " Prevent accidental closing of all buffers when doing :wq or :q
  26. cnoreabbrev wq w<bar>Sayonara
  27. cnoreabbrev q Sayonara
  28.  
  29. nnoremap <Leader>f :Files<CR>
  30. nnoremap <Leader>b :Buffers<CR>
  31. nnoremap <Leader>, :GFiles<CR>
  32. nnoremap <C-M> :NERDTreeToggle<CR>
  33. " Toggle paste mode mode with <Leader>pp
  34. nnoremap <Leader>pp :set paste!<CR>
  35. " Add a semicolon to the current line without moving the cursor with <Leader>;
  36. nnoremap <Leader>; m'A;<ESC>`'
  37. " Nerdtree mappings. nt = toggle, nf = find.
  38. noremap <Leader>nt :NERDTreeToggle<CR>
  39. nnoremap <Leader>nf :NERDTreeFind<CR>
  40. let g:NERDTreeQuitOnOpen = 1
  41.  
  42. let g:esearch = {
  43. \ 'adapter': 'rg',
  44. \ 'backend': 'nvim',
  45. \ 'out': 'win',
  46. \ 'batch_size': 1000,
  47. \ 'use': ['visual', 'hlsearch', 'last'],
  48. \ 'default_mappings': 1,
  49. \}
  50. " Start esearch prompt autofilled with one of g:esearch.use initial patterns
  51. call esearch#map('<leader>ff', 'esearch')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement