Advertisement
Guest User

dotfile

a guest
Feb 22nd, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 5.95 KB | None | 0 0
  1. "
  2. " init.vim by Felipe Ramos
  3. " for neovim
  4. "
  5.  
  6. " Plugins {{{
  7. call plug#begin()
  8.  
  9. Plug 'chriskempson/base16-vim'
  10. Plug 'mhinz/vim-startify'
  11. " Plug 'octol/vim-cpp-enhanced-highlight'
  12. " Plug 'joshdick/onedark.vim'
  13. Plug 'tpope/vim-sensible'
  14. Plug 'vim-airline/vim-airline'
  15. Plug 'vim-airline/vim-airline-themes'
  16. Plug 'vim-syntastic/syntastic'
  17. Plug 'sheerun/vim-polyglot'
  18. Plug 'scrooloose/nerdcommenter'
  19. " Plug 'scrooloose/nerdtree'
  20. Plug 'powerline/powerline'
  21. " Plug 'rafi/awesome-vim-colorschemes'
  22. " Plug 'chriskempson/base16-vim'
  23. Plug 'terryma/vim-multiple-cursors'
  24. Plug 'jiangmiao/auto-pairs'
  25. " Plug 'whatyouhide/vim-lengthmatters'
  26. " Plug 'jlanzarotta/bufexplorer'
  27. " Plug 'mhartington/oceanic-next'
  28.  
  29. call plug#end()
  30. "}}}
  31.  
  32. " Aesthetic configurations {{{
  33.  
  34. " Something related to 256 color rendering
  35. if has('nvim') || has('termguicolors')
  36.     set termguicolors
  37. endif
  38.  
  39. syntax enable
  40. let base16colorspace=256
  41.  
  42. colo base16-tomorrow-night
  43.  
  44. " oceanic-next theme
  45. " let g:oceanic_next_terminal_bold = 1
  46. " let g:oceanic_next_terminal_italic = 1
  47. " colo OceanicNext
  48.  
  49. " if filereadable(expand("~/.vimrc_background"))
  50.   " let base16colorspace=256
  51.   " source ~/.vimrc_background
  52. " endif
  53.  
  54. "}}}
  55.  
  56. " Custom set's {{{
  57. filetype plugin on
  58.  
  59. " Path related
  60. set path+=**
  61. set wildmenu
  62. set directory=$HOME/.vim/swp_files//
  63.  
  64. " Show cms while they're typed
  65. set showcmd
  66.  
  67. " Tab = 4 spaces
  68. set tabstop=4
  69. set shiftwidth=4
  70. set expandtab " Substitutes by spaces
  71. set autoindent
  72.  
  73. " Line numbers on the left
  74. set number
  75. " set relativenumber
  76. set nowrap  " disables wrap's
  77.  
  78. " Enable system clipboard with yank / paste. Like *"y
  79. set clipboard+=unnamed
  80.  
  81. " Indicator on 80 char
  82. set cc=80
  83.  
  84. " Get this really cool folding
  85. set foldmethod=marker
  86.  
  87. " When using on a GUI, use this font
  88. set guifont=DejaVu\ Sans\ Mono\ for\ Powerline:h14
  89.  
  90. " Highligh the current line
  91. " set cursorline
  92. "}}}
  93.  
  94. " Plugins settings {{{
  95.  
  96. " [off] PBCOPY AND PBPASTE settings ( Only works in macOS ) {{{
  97. " NOT NECESSARY WITH +clipboard VERSION
  98. " vnoremap <C-c> :w !pbcopy<CR><CR>
  99. " vnoremap <C-v> :r !pbpaste<CR><CR>
  100. "}}}
  101.  
  102. " [on] vim-instant-markdown config {{{
  103. let g:instant_markdown_slow = 1
  104. let g:instant_markdown_autostart = 0
  105.  
  106. " Keymap for enable the instantMarkdownPrevie (Opens a chrome window)
  107. nmap <M-p> :InstantMarkdownPreview<CR>
  108. " }}}
  109.  
  110. " [on] Syntastic Settings {{{
  111. let g:syntastic_check_on_open = 1
  112. let g:syntastic_error_symbol = ">>"
  113. let g:syntastic_warning_symbol = "~"
  114. let g:syntastic_always_populate_loc_list = 1
  115. let g:syntastic_python_checkers= ["flake8"]
  116. " }}}
  117.  
  118. " [off] Ale settings {{{
  119. " let g:airline#extensions#ale#enabled = 1
  120. " let g:ale_sign_error = '>>'
  121. " let g:ale_sign_warning = '~'
  122. " let g:ale_completion_enabled = 1
  123. " let g:ale_lint_delay = 1000
  124. " let g:ale_lint_on_text_changed = 'normal'
  125. " let g:ale_linters = {
  126. " \ 'python': ['flake8'],
  127. " \}
  128. "}}}
  129.  
  130. " [off] NERDTree settings {{{
  131. " Autostart when no file is specified
  132. " autocmd StdinReadPre * let s:std_in=1
  133. " autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
  134. " " Ctrl + N Toggle NERDTree
  135. " map <C-k> :NERDTreeToggle<CR>
  136. "}}}
  137.  
  138. " [on] Buffer explorer settings {{{
  139. " nmap <leader>b :BufExplorer<CR>
  140. "}}}
  141.  
  142. " [on] Powerline settings {{{
  143. set rtp+=/usr/local/lib/python2.7/site-packages/powerline/bindings/vim
  144. " let g:airline_powerline_fonts = 1
  145. "}}}
  146.  
  147. " [on] Airline settings {{{
  148. let g:airline_detect_paste=1
  149. let g:airline#extensions#tabline#enabled = 1
  150. " let g:airline_theme='onedark'
  151. " let g:airline_theme='oceanicnext'
  152. "}}}
  153.  
  154. " [on] NERDCommenter settings {{{
  155. " Add spaces after comment delimiters by default
  156. let g:NERDSpaceDelims = 1
  157. " Use compact syntax for prettified multi-line comments
  158. let g:NERDCompactSexyComs = 1
  159. " Align line-wise comment delimiters flush left instead of following code indentation
  160. let g:NERDDefaultAlign = 'left'
  161. " Set a language to use its alternate delimiters by default
  162. let g:NERDAltDelims_java = 1
  163. " Add your own custom formats or override the defaults
  164. let g:NERDCustomDelimiters = { 'c': { 'left': '/**','right': '*/' } }
  165. " Allow commenting and inverting empty lines (useful when commenting a region)
  166. let g:NERDCommentEmptyLines = 0
  167. " Enable trimming of trailing whitespace when uncommenting
  168. let g:NERDTrimTrailingWhitespace = 1
  169. "}}}
  170.  
  171. " [on] NERDTree settings {{{
  172. map <C-b> :NERDTreeToggle<CR>
  173. "}}}
  174.  
  175. " [off] Navigate thru panes using Command + H J K L {{{
  176. " nnoremap <C-J> <C-W><C-J>
  177. " nnoremap <C-K> <C-W><C-K>
  178. " nnoremap <C-L> <C-W><C-L>
  179. " nnoremap <C-H> <C-W><C-H>
  180. "}}}
  181.  
  182. " [on] AutoPairs settings {{{
  183. let g:AutoPairsShortcutToggle = '<M-a>'
  184. "}}}
  185.  
  186. " [on] vim-cpp-enhanced-highlight settings {{{
  187. let g:cpp_class_scope_highlight = 1
  188. let g:cpp_member_variable_highlight = 1
  189. let g:cpp_class_decl_highlight = 1
  190. let g:cpp_concepts_highlight = 1
  191. "}}}
  192.  
  193. " vim-multiple-cursors settings {{{
  194. " let g:multi_cursor_use_default_mapping=0
  195.  
  196. " Default mapping
  197. " let g:multi_cursor_start_word_key      = '<C-n>'
  198. " let g:multi_cursor_select_all_word_key = '<A-n>'
  199. " let g:multi_cursor_start_key           = 'g<C-n>'
  200. " let g:multi_cursor_select_all_key      = 'g<A-n>'
  201. " let g:multi_cursor_next_key            = '<C-n>'
  202. " let g:multi_cursor_prev_key            = '<C-p>'
  203. " let g:multi_cursor_skip_key            = '<C-x>'
  204. " let g:multi_cursor_quit_key            = '<Esc>'
  205.  
  206. " let g:multi_cursor_start_word_key      = '<M-n>'
  207. " let g:multi_cursor_select_all_word_key = '<A-n>'
  208. " let g:multi_cursor_start_key           = 'g<C-n>'
  209. " let g:multi_cursor_select_all_key      = 'g<A-n>'
  210. " let g:multi_cursor_next_key            = '<M-n>'
  211. " let g:multi_cursor_prev_key            = '<M-p>'
  212. " let g:multi_cursor_skip_key            = '<M-x>'
  213. " let g:multi_cursor_quit_key            = '<Esc>'
  214. "}}}
  215. "}}}
  216.  
  217. " Custom mappings {{{
  218.  
  219. " Auto compile C++ individual files
  220. nmap <M-r> :!g++ % -o %< --std=c++11 && ./%<<CR>
  221.  
  222. " Snippet for creating simple C++ files
  223. nmap <M-i> i#include <iostream><CR><CR>int main(int argc, char **argv){<CR>return 0;}<Esc>kO
  224.  
  225. "}}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement