Skip to content

Instantly share code, notes, and snippets.

@vinicio
Last active October 14, 2019 17:10
Show Gist options
  • Select an option

  • Save vinicio/d21c3c812dad1e835285e4787920b069 to your computer and use it in GitHub Desktop.

Select an option

Save vinicio/d21c3c812dad1e835285e4787920b069 to your computer and use it in GitHub Desktop.
call plug#begin('~/.local/share/nvim/plugged')
Plug 'ajh17/spacegray.vim'
Plug 'editorconfig/editorconfig-vim'
Plug 'ekalinin/dockerfile.vim'
Plug 'fatih/vim-go'
Plug 'godlygeek/tabular'
Plug 'isobit/vim-caddyfile'
Plug 'jiangmiao/auto-pairs'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --bin' }
Plug 'junegunn/fzf.vim'
Plug 'jwalton512/vim-blade'
Plug 'mustache/vim-mustache-handlebars'
Plug 'mxw/vim-jsx'
Plug 'pangloss/vim-javascript'
Plug 'scrooloose/nerdtree'
Plug 'tpope/vim-surround'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'chr4/nginx.vim'
Plug 'ldx/vim-indentfinder'
Plug 'valloric/youcompleteme'
call plug#end()
imap jj <esc>
map k gk
map j gj
set wildignore=*.o,*~,*.pyc
set number
" Mapleader
let mapleader = ","
" ,s save and go to normal mode
nnoremap <silent> <leader>s :w<CR>
imap <leader>s <ESC><leader>s
" close scratch window, quickfix & Remove search highlight
nnoremap <leader><space> :cclose<CR> :lclose<CR> :nohlsearch<CR> :pclose<CR>
" Search
set ignorecase
set smartcase
set incsearch " Incremental search
map <leader>h :set hlsearch!<cr>
set so=5
" Text, tab and indent related
set expandtab " Use spaces instead of tabs
set smarttab
set shiftwidth=4
set tabstop=4
set ai "Auto indent
set si "Smart indent
set clipboard=unnamedplus " System clipboard
set bg=dark
set guifont=Monaco
set completeopt-=preview
set updatetime=250
map <C-n> :NERDTreeToggle<CR>
map <C-p> :FZF<CR>
" Turn backup off, since most stuff is in SVN, git et.c anyway...
set nobackup
set nowb
set noswapfile
" Set syntax for specific files
autocmd BufRead,BufNewFile Dockerfile set syntax=Dockerfile
autocmd BufRead,BufNewFile *.jet.html set syntax=mustache
autocmd BufRead,BufNewFile *.conf set syntax=nginx
" airline
set noshowmode
set laststatus=2
let g:airline_theme='base16_grayscale'
" vim-go
let g:go_fmt_command = "goimports"
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_fields = 1
let g:go_highlight_types = 1
let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1
" YouCompleteMe
let g:ycm_server_python_interpreter = '/usr/bin/python'
" vim-jsx
let g:jsx_ext_required = 0
" Colorscheme
colorscheme spacegray
let g:spacegray_underline_search = 0
let g:spacegray_italicize_comments = 1
" Tabular.vim
nmap <Leader>a= :Tabularize /=<CR>
vmap <Leader>a= :Tabularize /=<CR>
nmap <Leader>a: :Tabularize /:\zs<CR>
vmap <Leader>a: :Tabularize /:\zs<CR>
nmap <Leader>a- :Tabularize /-<CR>
vmap <Leader>a- :Tabularize /-<CR>
" ale
let g:ale_lint_on_text_changed = 'never'
let g:ale_lint_on_enter = 0
" prevent p/P to yank
xnoremap <expr> p 'pgv"'.v:register.'y'
xnoremap <expr> P 'Pgv"'.v:register.'y'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment