Advertisement
Guest User

init.vim

a guest
Nov 3rd, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 3.45 KB | None | 0 0
  1. " Mirza Halilcevic
  2.  
  3. " ****************************************
  4. " Plugins
  5. " ****************************************
  6.  
  7. call plug#begin('~/.local/share/nvim/plugged')
  8.  
  9. " A code-completion engine for Vim
  10. Plug 'Valloric/YouCompleteMe'
  11.  
  12. " A command-line fuzzy finder
  13. Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
  14. Plug 'junegunn/fzf.vim'
  15.  
  16. " A light and configurable statusline/tabline plugin for Vim
  17. Plug 'itchyny/lightline.vim'
  18.  
  19. " True Sublime Text style multiple selections for Vim
  20. Plug 'terryma/vim-multiple-cursors'
  21.  
  22. " Helpers for UNIX
  23. Plug 'tpope/vim-eunuch'
  24.  
  25. " A tree explorer plugin for vim
  26. Plug 'scrooloose/nerdtree'
  27.  
  28. " A Vim plugin which shows a git diff in the 'gutter' (sign column) and
  29. " stages/undoes hunks
  30. Plug 'airblade/vim-gitgutter'
  31.  
  32. " A Git wrapper so awesome, it should be illegal
  33. Plug 'tpope/vim-fugitive'
  34.  
  35. " Forget Vim tabs - now you can have buffer tabs
  36. Plug 'ap/vim-buftabline'
  37.  
  38. " Vim syntax highlighting for meson
  39. Plug 'chadversary/vim-meson'
  40.  
  41. " Retro groove color scheme for Vim
  42. Plug 'morhetz/gruvbox'
  43.  
  44. " Insert or delete brackets, parens, quotes in pair
  45. Plug 'jiangmiao/auto-pairs'
  46.  
  47. " The ultimate snippet solution for Vim
  48. Plug 'SirVer/ultisnips'
  49.  
  50. " UltiSnips default snippets
  51. Plug 'honza/vim-snippets'
  52.  
  53. call plug#end()
  54.  
  55. " ****************************************
  56. " Global variables
  57. " ****************************************
  58.  
  59. " YouCompleteMe
  60. let g:ycm_global_ycm_extra_conf='~/.ycm_extra_conf.py'
  61. let g:ycm_confirm_extra_conf = 0
  62.  
  63. " lightline
  64. let g:lightline = {
  65.       \ 'colorscheme': 'gruvbox',
  66.       \ 'active': {
  67.       \   'left': [ [ 'mode', 'paste' ],
  68.       \             [ 'gitbranch', 'readonly', 'filename', 'modified' ] ]
  69.       \ },
  70.       \ 'component_function': {
  71.       \   'gitbranch': 'fugitive#head'
  72.       \ },
  73.       \ 'separator': { 'left': '', 'right': '' },
  74.       \ 'subseparator': { 'left': '', 'right': '' }
  75.       \ }
  76.  
  77. " UltiSnips
  78. let g:UltiSnipsExpandTrigger='<c-j>' " ctrl + j -> expands snippet
  79.  
  80. " ****************************************
  81. " Color
  82. " ****************************************
  83.  
  84. " colorscheme
  85. colorscheme gruvbox
  86. set background=dark
  87.  
  88. " ****************************************
  89. " Options
  90. " ****************************************
  91.  
  92. set noshowmode " disable mode indicator
  93. set number relativenumber " hybrid line numbers
  94. set mouse=a " enable mouse support
  95. set tabstop=2 shiftwidth=2 softtabstop=0 " tabs and indents are 2 spaces wide
  96. set expandtab smarttab " use spaces instead of tabs and enable smart tabs
  97. set autoindent smartindent " smart indentation
  98. set smartcase " smart case sensitive search
  99. set hidden " hide buffers with unsaved changes
  100. set scrolloff=3 " keep 3 lines above and below the cursor
  101. set cursorline " highlight current line
  102. set colorcolumn=80 " vertical ruler at column 80
  103. set undofile undodir=~/.local/share/nvim/undodir " enable undo files
  104. set undolevels=1000 undoreload=10000 " limit number of undos
  105. set completeopt-=preview " disable scratch preview
  106.  
  107. " ****************************************
  108. " Key mappings
  109. " ****************************************
  110.  
  111. " ; -> open fuzzy finder for files
  112. map ; :Files<CR>
  113.  
  114. " ctrl + o -> open tree explorer
  115. map <C-o> :NERDTreeToggle<CR>
  116.  
  117. " escape + tab -> next buffer
  118. nmap <esc><tab> :bnext<CR>
  119. " escape + backspace -> previous buffer
  120. nmap <esc><bs> :bprev<CR>
  121.  
  122. " escape -> enter normal mode in terminal
  123. tnoremap <Esc> <C-\><C-n>
  124.  
  125. " ****************************************
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement