-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
93 lines (74 loc) · 2.38 KB
/
vimrc
File metadata and controls
93 lines (74 loc) · 2.38 KB
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
" INSTALL vim-plug
" curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
set tabstop=4 softtabstop=0 expandtab shiftwidth=4 smarttab
au FocusLost * :set number
au FocusGained * :set relativenumber
autocmd InsertEnter * :set number
autocmd InsertLeave * :set relativenumber
set number
set rnu
" highlighting config
hi Search cterm=NONE ctermfg=white ctermbg=brown
map <C-h> :noh<Enter>
" python debug
ia pdb import pdb; pdb.set_trace()<ESC>
ia stack import traceback; traceback.print_stack()<ESC>
ia banana print(' BANANA !\n')<ESC>
" copy and paste
vmap <C-c> "+y
vmap <C-x> "+c
vmap <C-v> c<ESC>"+p
imap <C-v> <ESC>"+pa
" Search visually selected text
vnoremap // y/<C-R>"<CR>
" lightline config
let g:lightline = {
\ 'colorscheme': 'wombat',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'fugitive', 'readonly', 'filename', 'modified' ] ]
\ },
\ 'component': {
\ 'fugitive': '%{exists("*fugitive#head")?fugitive#head():""}',
\ 'readonly': '%{&filetype=="help"?"":&readonly?"":""}',
\ 'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}'
\ },
\ 'separator': { 'left': '', 'right': '' },
\ 'subseparator': { 'left': '', 'right': '' },
\ 'component_visible_condition': {
\ 'fugitive': '(exists("*fugitive#head") && ""!=fugitive#head())',
\ 'readonly': '(&filetype!="help"&& &readonly)',
\ 'modified': '(&filetype!="help"&&(&modified||!&modifiable))'
\ }
\ }
" ctrlp ignore
set wildignore+=*/tmp/*,*.so,*.swp,*.zip
let g:ctrlp_custom_ignore = {
\ 'dir': '\v[\/]\.?(git|hg|svn|doc)$',
\ 'file': '\v\.(exe|so|dll|pyc)$',
\ 'link': 'some_bad_symbolic_links',
\ }
" ctrlp use git index
let g:ctrlp_user_command = ['.git/', 'git ls-files --cached --others --exclude-standard %s']
" show whitespaces
map <C-s> :ShowWhiteToggle<CR>
" jedi-vim settings
let g:jedi#use_tabs_not_buffers = 1
let g:jedi#popup_on_dot = 0
" Plug, the vim plugin manager
call plug#begin('~/.config/nvim/plugged')
" lightline
Plug 'itchyny/lightline.vim'
" ctrlp
Plug 'ctrlpvim/ctrlp.vim'
" flake8
Plug 'nvie/vim-flake8'
" show whitespaces
Plug 'chrisbra/vim-show-whitespace'
" fugitive
Plug 'tpope/vim-fugitive'
" SilverSearcher Ag
Plug 'rking/ag.vim'
" nerdtree
Plug 'scrooloose/nerdtree'
call plug#end()