Skip to content

Instantly share code, notes, and snippets.

@r3gor
Last active April 8, 2024 05:25
Show Gist options
  • Save r3gor/6c0f62cc69f03190f367f5c9c736f9df to your computer and use it in GitHub Desktop.
Save r3gor/6c0f62cc69f03190f367f5c9c736f9df to your computer and use it in GitHub Desktop.
vim script config - vimplug
:set number
:set relativenumber
:set autoindent
:set tabstop=4
:set shiftwidth=4
:set smarttab
:set softtabstop=4
:set mouse=a
:set whichwrap+=<,>,[,] " right move in the first char of non first line move to end of previous line
:set foldmethod=syntax
:set foldlevel=99
call plug#begin()
Plug 'http://github.com/tpope/vim-surround' " Surrounding ysw)
Plug 'https://github.com/preservim/nerdtree' " NerdTree
Plug 'https://github.com/tpope/vim-commentary' " For Commenting gcc & gc
Plug 'https://github.com/vim-airline/vim-airline' " Status bar
Plug 'https://github.com/ap/vim-css-color' " CSS Color Preview
Plug 'https://github.com/rafi/awesome-vim-colorschemes' " Retro Scheme
Plug 'https://github.com/ryanoasis/vim-devicons' " Developer Icons
Plug 'https://github.com/tc50cal/vim-terminal' " Vim Terminal
Plug 'https://github.com/preservim/tagbar' " Tagbar for code navigation
Plug 'https://github.com/terryma/vim-multiple-cursors' " CTRL + N for multiple cursors
" Plug 'https://github.com/neoclide/coc.nvim' " Auto Completion
Plug 'dhruvasagar/vim-table-mode' " Autoformat tables (Markdown style)
Plug 'mxw/vim-jsx'
Plug 'pangloss/vim-javascript'
Plug 'lukas-reineke/indent-blankline.nvim'
Plug 'psliwka/vim-smoothie'
" esta version de telescope requiere de nvim 0.9 y tenemos v0.6, debemos buscar
" la version compatible para nvim 0.6 o buscar la version de telescope
" compatible para nvim v0.6
" Plug 'nvim-lua/plenary.nvim'
" Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.2' }
"------------------------ COC ------------------------
" coc for tslinting, auto complete and prettier
Plug 'neoclide/coc.nvim', {'do': 'yarn install --frozen-lockfile'}
" coc extensions
let g:coc_global_extensions = ['coc-tslint-plugin', 'coc-tsserver', 'coc-emmet', 'coc-css', 'coc-html', 'coc-json', 'coc-yank', 'coc-prettier']
"------------------------ VIM TSX ------------------------
" by default, if you open tsx file, neovim does not show syntax colors
" vim-tsx will do all the coloring for jsx in the .tsx file
Plug 'ianks/vim-tsx'
"------------------------ VIM TSX ------------------------
" by default, if you open tsx file, neovim does not show syntax colors
" typescript-vim will do all the coloring for typescript keywords
Plug 'leafgarland/typescript-vim'
" To try:
" ========
" Plug 'junegunn/vim-easy-align'
set encoding=UTF-8
call plug#end()
nnoremap <C-f> :NERDTreeFocus<CR>
nnoremap <C-n> :NERDTree<CR>
nnoremap <C-t> :NERDTreeToggle<CR>
nmap <F8> :TagbarToggle<CR>
:set completeopt-=preview " For No Previews
let g:airline_powerline_fonts = 1
":colorscheme iceberg
:colorscheme rdark-terminal2
inoremap <expr> <Tab> pumvisible() ? coc#_select_confirm() : "<Tab>"
" == AUTOCMD ================================
" by default .ts file are not identified as typescript and .tsx files are not
" identified as typescript react file, so add following
au BufNewFile,BufRead *.ts setlocal filetype=typescript
au BufNewFile,BufRead *.tsx setlocal filetype=typescript.tsx
" == AUTOCMD END ================================
"
xnoremap <leader>p "_dP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment