Skip to content

Instantly share code, notes, and snippets.

@PinheiroCosta
Last active July 31, 2021 20:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PinheiroCosta/04c59a3c8ebf13b2738422c57e573f1f to your computer and use it in GitHub Desktop.
Save PinheiroCosta/04c59a3c8ebf13b2738422c57e573f1f to your computer and use it in GitHub Desktop.
My vimrc file
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""" VIM SETTINGS
""" ============
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""" General configurations
set nu " show number of lines.
set encoding=utf-8
set nomodeline
""" Color Theme
let g:onedark_terminal_italics = 1
let g:onedark_termcolors = 256
syntax on
colorscheme onedark
""" Split Window Configuration
set splitbelow "asd"
set splitright
""" split navigations
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
""" Tab navigation
nnoremap <Leader>th :tabfirst<CR>
nnoremap <Leader>tj :tabnext<CR>
nnoremap <Leader>tk :tabprev<CR>
nnoremap <Leader>tl :tablast<CR>
nnoremap <Leader>tt :tabedit<Space>
nnoremap <Leader>tn :tabnext<Space>
nnoremap <Leader>tm :tabm<Space>
nnoremap <Leader>td :tabclose<CR>
""" Folding
set foldmethod=indent
set foldlevel=99
nnoremap <space> za
""" Indentation
set shiftwidth=4
set smartindent
set autoindent
""" show results from terminal commands within vim!
"set t_ti= t_te=
""" Press Q or q to Insert quotation marks on selected text.
vnoremap q di'<esc>pli'<esc>
vnoremap Q di"<esc>pli"<esc>
""" Use system clipboard to copy and paste
set clipboard=unnamedplus
""" Auto complete
" while in insert mode, press CTRL-X to enter auto complete mode
" then press CTRL-O to show you the options avaiable
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags """ html
autocmd FileType css set omnifunc=csscomplete#CompleteCSS """ css
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""" Vim Plugin list
""" ===============
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
call plug#begin('~/.vim/plugged')
Plug 'scrooloose/nerdtree'
Plug 'preservim/nerdcommenter'
Plug 'jiangmiao/auto-pairs'
Plug 'joshdick/onedark.vim'
Plug 'sheerun/vim-polyglot'
Plug 'dense-analysis/ale'
Plug 'ycm-core/YouCompleteMe'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'tpope/vim-fugitive'
Plug 'MichaelMure/mdr'
Plug 'pangloss/vim-javascript'
Plug 'skanehira/preview-markdown.vim'
Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']}
call plug#end()
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""" NerdTree -> Ctrl + n
map <C-n> :NERDTreeToggle<CR>
""""""""""""""""""""""""""""""
""""""""""" Ale
let g:ale_enabled = 1
let g:ale_completion_enabled = 1
""""""""""""""""""""""""""""""""
""""" Markdown -> CTRL + p
map <C-p> :MarkdownPreview<CR>
let g:preview_markdown_vertical = 1
"""""""""""""""""""""""""""""""""""
"""""""""""""""""""""""""""""""""""
""""" Airline
let g:airline#extensions#tabline#enabled = 1
let g:airline_powerline_fonts = 1
@PinheiroCosta
Copy link
Author

PinheiroCosta commented Aug 10, 2020

useful plugins and vim configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment