Created
March 20, 2019 21:51
-
-
Save arthurstomp/82bbf154fb569b0a8d4b294bd8fcb6bc to your computer and use it in GitHub Desktop.
init.vim
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
filetype off | |
set encoding=UTF-8 | |
set nobackup | |
set nowritebackup | |
set noswapfile | |
call plug#begin('~/.local/share/nvim/plugged') | |
" Aesthetics | |
Plug 'ryanoasis/vim-devicons' | |
Plug 'kien/rainbow_parentheses.vim' | |
" Themes | |
Plug 'dracula/vim', { 'as': 'dracula' } | |
Plug 'tyrannicaltoucan/vim-deep-space', { 'as': 'deep-space' } | |
Plug 'jacoborus/tender.vim', { 'as': 'tender' } | |
Plug 'nightsense/carbonized', { 'as': 'carbonized' } | |
" Tools | |
Plug 'scrooloose/nerdtree' | |
Plug 'scrooloose/nerdcommenter' | |
Plug 'tpope/vim-surround' | |
Plug 'tpope/vim-sensible' | |
Plug 'tpope/vim-fugitive' | |
Plug 'majutsushi/tagbar' | |
Plug 'ctrlpvim/ctrlp.vim' | |
Plug 'ludovicchabant/vim-ctrlp-autoignore' | |
Plug 'lokikl/vim-ctrlp-ag' | |
" Focus | |
Plug 'junegunn/goyo.vim' | |
Plug 'junegunn/limelight.vim' | |
" Syntax | |
Plug 'sheerun/vim-polyglot' | |
call plug#end() | |
filetype plugin indent on | |
set number | |
set relativenumber | |
" Set tab character that appear 2-spaces-wide | |
set tabstop=2 | |
" Set syntax highlighting on | |
syntax on | |
set termguicolors | |
" Fix scroll bug | |
syn sync fromstart | |
" Set colorscheme | |
colorscheme deep-space | |
set background=dark | |
" Set color column at 80 | |
highlight ColorColumn guibg=#51617d | |
set colorcolumn=80 | |
" CtrlP | |
let g:ctrlp_extensions = ['autoignore'] | |
let g:ctrlp_ag_ignores = '--ignore .git | |
\ --ignore "deps/*" | |
\ --ignore "_build/*" | |
\ --ignore "node_modules/*"' | |
" By default ag will search from PWD | |
" But you may enable one of below line to use an arbitrary directory or, | |
" Using the magic word 'current-file-dir' to use current file base directory | |
" let g:ctrlp_ag_search_base = 'current-file-dir' | |
" Set Rainbow Parenteses always on. | |
au VimEnter * RainbowParenthesesToggle | |
au Syntax * RainbowParenthesesLoadRound | |
au Syntax * RainbowParenthesesLoadSquare | |
au Syntax * RainbowParenthesesLoadBraces | |
" Maps | |
map <C-n> :NERDTreeToggle<CR> | |
tnoremap <Esc> <C-\><C-n> | |
tnoremap <M-[> <Esc> | |
" Terminal mode: | |
tnoremap <A-h> <c-\><c-n><c-w>h | |
tnoremap <A-j> <c-\><c-n><c-w>j | |
tnoremap <A-k> <c-\><c-n><c-w>k | |
tnoremap <A-l> <c-\><c-n><c-w>l | |
" Insert mode: | |
imap <c-h> <Esc><c-w>h | |
imap <c-j> <Esc><c-w>j | |
imap <c-k> <Esc><c-w>k | |
imap <c-l> <Esc><c-w>l | |
" Visual mode: | |
vmap <c-h> <Esc><c-w>h | |
vmap <c-j> <Esc><c-w>j | |
vmap <c-k> <Esc><c-w>k | |
vmap <c-l> <Esc><c-w>l | |
" Normal mode: | |
nmap <c-h> <c-w>h | |
nmap <c-j> <c-w>j | |
nmap <c-k> <c-w>k | |
nmap <c-l> <c-w>l | |
" Tagbar | |
nmap <F8> :TagbarToggle<CR> | |
" CtrlP | |
nnoremap <c-f> :CtrlPag<cr> | |
vnoremap <c-f> :CtrlPagVisual<cr> | |
nnoremap <leader>ca :CtrlPagLocate | |
nnoremap <leader>cp :CtrlPagPrevious<cr> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment