-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.vim
57 lines (42 loc) · 1.24 KB
/
init.vim
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
" Most of my Neovim usage is via vscode,
" which takes care of many common settings
""" [Pathogen]
execute pathogen#infect()
""" [vim-plug]
call plug#begin()
Plug 'sillybun/vim-repl'
call plug#end()
" REPLToggle bind
nnoremap <leader>r :REPLToggle<Cr>
""" [General Settings]
syntax on
filetype plugin indent on
set indentexpr=""
set number
set relativenumber
""" [vim-argwrap]
" Upstream: https://git.foosoft.net/alex/vim-argwrap
" Fork: https://github.com/joshua-dean/vim-argwrap
" Don't wrap for triple quotes (feature from my fork)
let g:argwrap_tail_comma_braces = '[({'
command! AW ArgWrap
""" [Commands]
" Python Main Block
command! MainBlock execute "normal! Goif __name__ == \"__main__\":<Esc>opass<Esc>"
command! MB MainBlock
" Expand DocStr
command! DocStrWrap execute "normal! F\"a<Return><Esc>f\"i<Return><Esc>"
command! DSW DocStrWrap
" Duplicate and Comment Line
command! DuplicateAndComment execute "normal! yypkI# <Esc>"
command! DAC DuplicateAndComment
" Copy all
command! CPA execute "normal! maggVG\"+y`a<Esc>"
" Delete all
command! DA execute "normal! ggVGd"
" Paste
command! P execute "normal! \"+p"
" Paste inside quotes
command! PIQ execute "normal! T\"dt\"\"+P"
" Yank inside quotes
command! YIQ execute "normal! T\"vt\"\"+y"