Advertisement
niels68

nvim

Feb 21st, 2024
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 3.96 KB | TV | 0 0
  1. set number
  2. set nolist
  3. set ruler
  4. set rnu
  5. set cursorline
  6. set mouse=a
  7. set clipboard=unnamed
  8. set laststatus=2
  9. set showcmd
  10. set noshowmode
  11. set showmatch
  12. set encoding=utf-8
  13. set regexpengine=0
  14. syntax enable
  15. set foldlevelstart=20
  16. let mapleader=","
  17.  
  18. " Directorio de plugins
  19. call plug#begin()
  20.     Plug 'tpope/vim-surround'
  21.     Plug 'tpope/vim-fugitive'
  22.     Plug 'tpope/vim-commentary'
  23.     Plug 'tpope/vim-repeat'
  24.     Plug 'easymotion/vim-easymotion'
  25.     Plug 'godlygeek/tabular', { 'for': 'markdown'}
  26.     Plug 'plasticboy/vim-markdown', { 'for': 'markdown'}
  27.     Plug 'christoomey/vim-tmux-navigator'
  28.     Plug 'junegunn/vim-easy-align'
  29.     Plug 'scrooloose/nerdtree', { 'on':  'NERDTreeToggle' }
  30.     Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
  31.     Plug 'Yggdroot/indentLine'
  32.     Plug 'jiangmiao/auto-pairs'
  33.     Plug 'xuyuanp/nerdtree-git-plugin'
  34.     Plug 'tomasiser/vim-code-dark'
  35.     Plug 'vim-airline/vim-airline'
  36.     Plug 'neoclide/coc.nvim', {'branch': 'release'}
  37.     Plug 'honza/vim-snippets'
  38.     Plug 'stephpy/vim-yaml'
  39.     Plug 'pedrohdz/vim-yaml-folds'
  40. call plug#end()
  41.  
  42. " Luego de esta línea puedes agregar tus configuraciones y mapping
  43. " yaml config
  44. autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
  45.  
  46. "Folding
  47. let g:yaml_limit_spell_check = 1
  48.  
  49. "Linter
  50. let g:ale_echo_msg_format = '[%linter%] %s [%severity%]'
  51. let g:ale_sign_error = '✘'
  52. let g:ale_sign_warning = '⚠'
  53. let g:ale_lint_on_text_changed = 'never'
  54.  
  55. noremap <leader>q c"<C-r>""
  56. nmap<Leader>s <Plug>(easymotion-s2)
  57.  
  58. "configure plugins
  59. "coc
  60. noremap <leader>gs :CocSearch
  61. noremap <leader>fs :Files<cr>
  62.  
  63. nmap <silent> gd <Plug>(coc-definition)
  64. nmap <silent> gy <Plug>(coc-type-definition)
  65. nmap <silent> gi <Plug>(coc-implementation)
  66. nmap <silent> gr <Plug>(coc-references)
  67.  
  68. " template
  69. " Expandir snippet con Ctrl + j
  70. let g:UltiSnipsExpandTrigger = '<c-j>'
  71.  
  72. " Ir a siguiente ubicacion con Ctrl + j
  73. let g:UltiSnipsJumpForwardTrigger = '<c-j>'
  74. " Ir a anterior ubicacion con Ctrl + k
  75. let g:UltiSnipsJumpBackwardTrigger = '<c-k>'"
  76.  
  77. "nerdtree
  78.   let g:NERDTreeChDirMode=2
  79.   let g:NERDTreeIgnore=['\.rbc$', '\~$', '\.pyc$', '\.db$', '\.sqlite$', '__pycache__']
  80.   let g:NERDTreeSortOrder=['^__\.py$', '\/$', '*', '\.swp$', '\.bak$', '\~$']
  81.   let g:NERDTreeShowBookmarks=1
  82.   let g:nerdtree_tabs_focus_on_files=1
  83.   let g:NERDTreeMapOpenInTabSilent = '<RightMouse>'
  84.   let g:NERDTreeWinSize = 30
  85.   set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*.pyc,*.db,*.sqlite
  86.   nnoremap <silent> <F2> :NERDTreeFind<CR>
  87.   noremap <F3> :NERDTreeToggle<CR>
  88.   autocmd bufenter * if(winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
  89.   autocmd VimEnter * NERDTree
  90. "end_nerdtree
  91. "Jenkinsfile groovy
  92. au BufNewFile,BufRead Jenkinsfile setf groovy
  93.  
  94. "tab
  95. " size of a hard tabstop
  96. set tabstop=4
  97.  
  98. " always uses spaces instead of tab characters
  99. set expandtab
  100.  
  101. " size of an "indent"
  102. set shiftwidth=2
  103. set autoindent
  104. " color theme vscode
  105. colorscheme codedark
  106.  
  107. " copy all
  108. "map <C-a> <esc>ggVG<CR>
  109. nnoremap <C-a> ggmqvG"+y'q
  110.  
  111. " No mostrar en ciertos tipos de buffers y archivos
  112. let g:indentLine_fileTypeExclude = ['text', 'sh', 'help', 'terminal']
  113. let g:indentLine_bufNameExclude = ['NERD_tree.*', 'term:.*']
  114. let g:indentLine_char = '⦙'
  115. " Ejecutar comandos con alt-enter :Commands
  116. let g:fzf_commands_expect = 'alt-enter'
  117. " Guardar historial de busquedas
  118. let g:fzf_history_dir = '~/.local/share/fzf-history'
  119.  
  120. " Empezar a buscar presionando Ctrl + p
  121. " nnoremap <C-p> :Files<CR>
  122.  
  123. "let g:airline_powerline_fonts = 1
  124. let g:airline#extensions#tabline#enabled = 1  " Mostrar buffers abiertos (como pesta√±as)
  125. let g:airline#extensions#tabline#fnamemod = ':t'  " Mostrar s√≥lo el nombre del archivo
  126. let g:airline#extensions#tabline#left_sep = ' '
  127. let g:airline#extensions#tabline#left_alt_sep = '|'
  128. let g:airline#extensions#tabline#formatter = 'default'
  129. set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%l,%v][%p%%]\ [BUFFER=%n]\ %{strftime('%c')}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement