-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.vimrc
88 lines (66 loc) · 2.13 KB
/
.vimrc
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
" Hannu Hartikainen's init.vim / .vimrc.
" Rewritten (greatly simplified) in 2017.
"
" QUICK START:
" :PlugUpdate | PlugUpgrade
" defaults I like
set softtabstop=4 shiftwidth=4 expandtab autoindent
set mouse=a
" interactive :substitute
if exists('+inccommand')
set inccommand=nosplit
endif
" load Code::Stats API keys from a file excluded from git
runtime _secrets.vim
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" PLUGINS
"
" Use vim-plug; see https://github.com/junegunn/vim-plug .
" Note: symlink ~/.config/nvim -> ~/.vim for NeoVim
call plug#begin('~/.vim/plugged')
" basic UI
Plug 'tpope/vim-sensible'
Plug 'tpope/vim-repeat'
Plug 'tpope/vim-sleuth'
Plug 'tpope/vim-surround'
Plug 'junegunn/vim-easy-align'
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim' " Note: fzf should be installed globally
Plug 'vim-airline/vim-airline'
" language support
Plug 'sheerun/vim-polyglot' " pretty much every language
" note-keeping: vimwiki
Plug 'vimwiki/vimwiki'
" code-stats-vim
"Plug '~/dev/code-stats-vim' " local instance
Plug 'https://gitlab.com/code-stats/code-stats-vim.git'
Plug '[email protected]:~dancek/vimini'
call plug#end()
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" PLUGIN CONFIGS
""" fzf.vim
nmap <c-p> :Files<CR>
nmap <c-h> :Helptags<CR>
nmap <c-f> :Lines<CR>
nmap <c-b> :Buffers<CR>
""" vim-airline
let g:airline_powerline_fonts = 1
let g:airline_section_x = airline#section#create_right(['tagbar', 'filetype', '%{CodeStatsXp()}'])
""" vim-easy-align
" Start interactive EasyAlign in visual mode (e.g. vipga)
xmap ga <Plug>(EasyAlign)
" Start interactive EasyAlign for a motion/text object (e.g. gaip)
nmap ga <Plug>(EasyAlign)
""" vimwiki
let g:vimwiki_autowriteall = 1
let g:vimwiki_list = [{'path': '~/vimwiki/', 'syntax': 'markdown', 'ext': '.md'}]
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" CUSTOM KEYBINDS
" inspired by https://amp.rs
nmap <Tab> :bnext<CR>
nmap <S-Tab> :bprevious<CR>
nmap <Space> :Files<CR>
nmap Q :bdelete<CR>
" TODO: clever-f or even easymotion, once i get used to these
" Ctrl-c for system clipboard
map <C-c> "+y