-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc.minimal
111 lines (89 loc) · 2.54 KB
/
.vimrc.minimal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
" Plugins
call plug#begin()
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
Plug 'preservim/nerdtree'
if has('nvim')
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
else
Plug 'Shougo/deoplete.nvim'
Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc'
endif
Plug 'Shougo/neosnippet.vim'
Plug 'Shougo/neosnippet-snippets'
Plug 'ludovicchabant/vim-gutentags'
Plug 'tpope/vim-fugitive'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
call plug#end()
" Forget being compatible with good ol' vi
set nocompatible
" Get that filetype stuff happening
filetype on
filetype plugin on
filetype indent on
" Turn on that syntax highlighting
syntax on
" Why is this not a default
set hidden
" Don't update the display while executing macros
" set lazyredraw
" At least let yourself know what mode you're in
set showmode
" Enable enhanced command-line completion. Presumes you have compiled
" with +wildmenu. See :help 'wildmenu'
set wildmenu
" Automatically change the current directory
set autochdir
""" Keys
let mapleader = ","
" Let's make it easy to edit this file (mnemonic for the key sequence is
" 'e'dit 'v'imrc)
nmap <silent> ,ev :e ~/.vimrc<cr>
" And to source this file as well (mnemonic for the key sequence is
" 's'ource 'v'imrc)
nmap <silent> ,sv :so ~/.vimrc<cr>
" Keep center
nnoremap j jzz
nnoremap k kzz
" Clipboard
set clipboard+=unnamedplus
" Path: search down into subfolders
" Provide tab-completion for all file-related tasks
set path+=**
" Show line number
set number
" Shortcuts
nnoremap ,w :w<CR>
nnoremap ,e :!%:p<CR>
" Use cursor to navigate
set mouse=a
" Tabs
nnoremap <C-t> :tabnew<CR>
nnoremap <C-j> :tabprevious<CR>
nnoremap <C-k> :tabnext<CR>
" Nerdtree
nnoremap <leader>n :NERDTreeFocus<CR>
" nnoremap <C-n> :NERDTree<CR>
nnoremap <leader>t :NERDTreeToggle<CR>
nnoremap <leader>f :NERDTreeFind<CR>
nnoremap <leader>v :NERDTreeVCS<CR>
" Neosnippet
let g:deoplete#enable_at_startup = 1
"" Plugin key-mappings.
"" Note: It must be "imap" and "smap". It uses <Plug> mappings.
imap <C-k> <Plug>(neosnippet_expand_or_jump)
smap <C-k> <Plug>(neosnippet_expand_or_jump)
xmap <C-k> <Plug>(neosnippet_expand_target)
" Vim-go
"" show GoInfo while moving
let g:go_auto_type_info = 1
set updatetime=100 " refresh faster
"" Identifier highlighting
let g:go_auto_sameids = 1
nnoremap <leader>r :GoReferrers<CR>
" FZF
" - down / up / left / right
let g:fzf_layout = { 'down': '40%' }
nnoremap <C-p> :Files<CR>
nnoremap <C-g> :Rg<CR>