Skip to content

Instantly share code, notes, and snippets.

@zgiber
Last active August 2, 2016 13:37
Show Gist options
  • Save zgiber/bcd1fe1a2e06bb1883485cb2833280e9 to your computer and use it in GitHub Desktop.
Save zgiber/bcd1fe1a2e06bb1883485cb2833280e9 to your computer and use it in GitHub Desktop.
neovim
set runtimepath^=/Users/zoltangiber/.config/nvim/dein/repos/github.com/Shougo/dein.vim
set swapfile
set backupdir=~/tmp
set nowrap
" call dein#begin(expand('~/.cache/dein'))
call dein#begin(expand('/Users/zoltangiber/.config/nvim/dein'))
call dein#add('Shougo/dein.vim')
call dein#add('Shougo/unite.vim')
call dein#add('bling/vim-airline')
call dein#add('Raimondi/delimitMate')
call dein#add('fatih/vim-go')
call dein#add('Shougo/neosnippet-snippets')
call dein#add('Shougo/neosnippet')
call dein#add('Shougo/deoplete.nvim')
call dein#add('zchee/deoplete-go', {'build': 'make'})
call dein#add('tpope/vim-fugitive')
call dein#add('airblade/vim-gitgutter')
call dein#add('kien/ctrlp.vim')
call dein#add('scrooloose/nerdcommenter')
call dein#add('majutsushi/tagbar')
call dein#add('tomasr/molokai')
call dein#add('scrooloose/nerdtree')
call dein#add('maksimr/vim-jsbeautify')
call dein#end()
filetype plugin indent on
set omnifunc=syntaxcomplete#Complete
set number
set completeopt-=preview
syntax on
colorscheme molokai
set fillchars=vert:\│
let g:molokai_original = 1
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#fnamemod = ':t'
" cursor things
highlight Cursor guifg=white guibg=black
highlight iCursor guifg=white guibg=steelblue
set guicursor=n-v-c:block-Cursor
set guicursor+=i:ver100-iCursor
set guicursor+=n-v-c:blinkon0
set guicursor+=i:blinkwait10
" JSbeautify
autocmd FileType javascript noremap <buffer> <c-f> :call JsBeautify()<cr>
" for json
autocmd FileType json noremap <buffer> <c-f> :call JsonBeautify()<cr>
" for jsx
autocmd FileType jsx noremap <buffer> <c-f> :call JsxBeautify()<cr>
" for html
autocmd FileType html noremap <buffer> <c-f> :call HtmlBeautify()<cr>
" for css or scss
autocmd FileType css noremap <buffer> <c-f> :call CSSBeautify()<cr>
" cursor things
highlight Cursor guifg=white guibg=black
highlight iCursor guifg=white guibg=steelblue
set guicursor=n-v-c:block-Cursor
set guicursor+=i:ver100-iCursor
set guicursor+=n-v-c:blinkon0
set guicursor+=i:blinkwait10
nnoremap <C-p> :Unite file_rec/async<cr>
map <SPACE> <Leader>
nnoremap <C-j> :bprevious<cr>
nnoremap <C-k> :bnext<cr>
nnoremap <leader>cd :cd %:p:h<CR>:pwd<CR>
tnoremap <leader>h <C-\><C-n><C-w>h
tnoremap <leader>j <C-\><C-n><C-w>j
tnoremap <leader>k <C-\><C-n><C-w>k
tnoremap <leader>l <C-\><C-n><C-w>l
nmap <F8> :TagbarToggle<CR>
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'
let g:ctrlp_working_path_mode = 'ra'
let g:deoplete#enable_at_startup = 1
set wildignore+=*/tmp/*,*.so,*.swp,*.zip " MacOSX/Linux
set laststatus=2
set hidden
let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$'
au FileType go nmap <Leader>p :GoDeclsDir<CR>
nnoremap <Leader>l <C-w><C-l>
nmap <F8> :TagbarToggle<CR>
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'
let g:ctrlp_working_path_mode = 'ra'
let g:deoplete#enable_at_startup = 1
set wildignore+=*/tmp/*,*.so,*.swp,*.zip " MacOSX/Linux
set laststatus=2
set hidden
let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$'
" NERDTree
nnoremap <Leader>n :NERDTreeToggle<CR>
let g:NERDTreeDirArrowExpandable = '▸'
let g:NERDTreeDirArrowCollapsible = '▾'
" vim-go stuff
au FileType go nmap <leader>r <Plug>(go-run)
au FileType go nmap <leader>b <Plug>(go-build)
au FileType go nmap <leader>t <Plug>(go-test)
au FileType go nmap <leader>c <Plug>(go-coverage)
au FileType go nmap <Leader>ds <Plug>(go-def-split)
au FileType go nmap <Leader>dv <Plug>(go-def-vertical)
au FileType go nmap <Leader>dt <Plug>(go-def-tab)
au FileType go nmap <Leader>gd <Plug>(go-doc)
au FileType go nmap <Leader>gv <Plug>(go-doc-vertical)
au FileType go nmap <Leader>gb <Plug>(go-doc-browser)
au FileType go nmap <Leader>s <Plug>(go-implements)
au FileType go nmap <Leader>i <Plug>(go-info)
au FileType go nmap <Leader>e <Plug>(go-rename)
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_structs = 1
let g:go_highlight_interfaces = 1
let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1
au FileType go nmap <leader>rt <Plug>(go-run-tab)
au FileType go nmap <Leader>rs <Plug>(go-run-split)
au FileType go nmap <Leader>rv <Plug>(go-run-vertical)
let g:tagbar_ctags_bin= '/Users/zgiber/Dev/go/bin/gotags'
let g:tagbar_type_go = {
\ 'ctagstype' : 'go',
\ 'kinds' : [
\ 'p:package',
\ 'i:imports:1',
\ 'c:constants',
\ 'v:variables',
\ 't:types',
\ 'n:interfaces',
\ 'w:fields',
\ 'e:embedded',
\ 'm:methods',
\ 'r:constructor',
\ 'f:functions'
\ ],
\ 'sro' : '.',
\ 'kind2scope' : {
\ 't' : 'ctype',
\ 'n' : 'ntype'
\ },
\ 'scope2kind' : {
\ 'ctype' : 't',
\ 'ntype' : 'n'
\ },
\ 'ctagsbin' : '/Users/zgiber/Dev/go/bin/gotags',
\ 'ctagsargs' : '-sort -silent'
\
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment