" Specify a directory for plugins
-call plug#begin('~/.vim/plugged')
+call plug#begin('~/.config/nvim/plugins/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
Plug 'airblade/vim-gitgutter'
Plug 'ctrlpvim/ctrlp.vim' " fuzzy find files
Plug 'scrooloose/nerdcommenter'
-"Plug 'prettier/vim-prettier', { 'do': 'yarn install' }
-
"This is a linter for python
-Plug 'ChristianChiarulli/codi.vim'
-
-
+Plug 'metakirby5/codi.vim'
Plug 'christoomey/vim-tmux-navigator'
-
Plug 'morhetz/gruvbox'
Plug 'dracula/vim',{'as':'dracula'}
Plug 'HerringtonDarkholme/yats.vim' " TS Syntax
" Initialize plugin system
call plug#end()
+
+"Remaps:
+"jk in insert mode takes you back to normal mode
inoremap jk <ESC>
+"Ctrl-n activates nerd toggle
nmap <C-n> :NERDTreeToggle<CR>
+"Ctrl-s saves
nmap <C-s> :w<CR>
+"++ in vmap or nmap coments
vmap ++ <plug>NERDCommenterToggle
nmap ++ <plug>NERDCommenterToggle
-set timeout timeoutlen=2000
+
+"Personalizado:
+"espera dos segundos para el completado de comandos
+set timeout timeoutlen=2000
+"Tabs and indents
+set tabstop=4 softtabstop=4
+set shiftwidth=4
+set smarttab
+set expandtab
+set smartindent
+"accept colorscheme
set termguicolors
+"numbers
set number
+set relativenumber
+"cases
set ignorecase
set smartcase
-set relativenumber
"colorscheme dracula
colorscheme gruvbox
+"Random_useful_stuff:
+"executing any .vimrc that is in the current directory for project specific
+"configurations that i might need:
+set exrc
+"No highligt search plus incremental search:
+set nohlsearch
+set incsearch
+"keep buffers arround while open:
+set hidden
+"No random sound:
+set noerrorbells
+"Extra space on the bottom
+set scrolloff=8
+"colors:
+syntax on
+"A bar on the side:
+set signcolumn=yes
+" j/k will move virtual lines (lines that wrap)
+noremap <silent> <expr> j (v:count == 0 ? 'gj' : 'j')
+noremap <silent> <expr> k (v:count == 0 ? 'gk' : 'k')
+"Better look for messages
+set cmdheight=2
+"300ms without activity to write to disk the swapfile
+set updatetime=300
+" don't give |ins-completion-menu| messages.
+set shortmess+=c
+"Codi:
" Change the color
highlight CodiVirtualText guifg=cyan
-
+"The indicator for codi
let g:codi#virtual_text_prefix = "❯ "
-
-
-"
let g:codi#aliases = {
\ 'javascript.jsx': 'javascript',
\ }
+"Ctrlp:
+let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard']
-" open NERDTree automatically
-"autocmd StdinReadPre * let s:std_in=1
-"autocmd VimEnter * NERDTree
-
-let g:NERDTreeGitStatusWithFlags = 1
-"let g:WebDevIconsUnicodeDecorateFolderNodes = 1
-"let g:NERDTreeGitStatusNodeColorization = 1
-"let g:NERDTreeColorMapCustom = {
- "\ "Staged" : "#0ee375",
- "\ "Modified" : "#d9bf91",
- "\ "Renamed" : "#51C9FC",
- "\ "Untracked" : "#FCE77C",
- "\ "Unmerged" : "#FC51E6",
- "\ "Dirty" : "#FFBD61",
- "\ "Clean" : "#87939A",
- "\ "Ignored" : "#808080"
- "\ }
-
-
-let g:NERDTreeIgnore = ['^node_modules$']
-" vim-prettier
+"Vim_prettier:
"let g:prettier#quickfix_enabled = 0
"let g:prettier#quickfix_auto_focus = 0
" prettier command for coc
"autocmd BufWritePre *.js,*.jsx,*.mjs,*.ts,*.tsx,*.css,*.less,*.scss,*.json,*.graphql,*.md,*.vue,*.yaml,*.html PrettierAsync
-" ctrlp
-let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard']
-
-" j/k will move virtual lines (lines that wrap)
-noremap <silent> <expr> j (v:count == 0 ? 'gj' : 'j')
-noremap <silent> <expr> k (v:count == 0 ? 'gk' : 'k')
-
-
-set smarttab
-set cindent
-set tabstop=2
-set shiftwidth=2
-" always uses spaces instead of tab characters
-set expandtab
-
-
-
+"NERDTree:
+let g:NERDTreeGitStatusWithFlags = 1
+let g:WebDevIconsUnicodeDecorateFolderNodes = 1
+let g:NERDTreeGitStatusNodeColorization = 1
+let g:NERDTreeColorMapCustom = {
+ \ "Staged" : "#0ee375",
+ \ "Modified" : "#d9bf91",
+ \ "Renamed" : "#51C9FC",
+ \ "Untracked" : "#FCE77C",
+ \ "Unmerged" : "#FC51E6",
+ \ "Dirty" : "#FFBD61",
+ \ "Clean" : "#87939A",
+ \ "Ignored" : "#808080"
+ \ }
+let g:NERDTreeIgnore = ['^node_modules$']
" sync open file with NERDTree
" " Check if NERDTree is open or active
function! IsNERDTreeOpen()
return exists("t:NERDTreeBufName") && (bufwinnr(t:NERDTreeBufName) != -1)
endfunction
-
" Call NERDTreeFind iff NERDTree is active, current window contains a modifiable
" file, and we're not in vimdiff
function! SyncTree()
wincmd p
endif
endfunction
-
" Highlight currently open buffer in NERDTree
autocmd BufEnter * call SyncTree()
-" coc config
+
+"Coc:
let g:coc_global_extensions = [
\ 'coc-snippets',
\ 'coc-pairs',
\ 'coc-markdownlint',
\ 'coc-python',
\ ]
-" from readme
-" if hidden is not set, TextEdit might fail.
-set hidden " Some servers have issues with backup files, see #649 set nobackup set nowritebackup " Better display for messages set cmdheight=2 " You will have bad experience for diagnostic messages when it's default 4000.
-set updatetime=300
-
-" don't give |ins-completion-menu| messages.
-set shortmess+=c
-
-" always show signcolumns
-set signcolumn=yes
" Use tab for trigger completion with characters ahead and navigate.
" Use command ':verbose imap <tab>' to make sure tab is not mapped by other plugin.