forked from farzadghanei/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_vimrc
More file actions
155 lines (131 loc) · 3.62 KB
/
dot_vimrc
File metadata and controls
155 lines (131 loc) · 3.62 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
""" Vundle Entries
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" Plugins here:
"
" shortnames come from http://github.com
" long names could include a git repo URL
"
" Run :PluginInstall! to install/update bundles
"
" let Vundle manage Vundle
" required!
Plugin 'VundleVim/Vundle.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'Lokaltog/vim-easymotion'
Plugin 'scrooloose/nerdcommenter'
" Python-imports doesn't work with Nix
"Plugin 'mgedmin/python-imports.vim'
Plugin 'LnL7/vim-nix'
map <F5> :ImportName<CR>
Plugin 'majutsushi/tagbar'
nmap <F4> :TagbarToggle<CR>
Plugin 'airblade/vim-gitgutter'
let g:gitgutter_sign_column_always = 0
Plugin 'vim-scripts/The-NERD-tree'
let NERDTreeWinPos = 'left'
map <F3> :NERDTreeToggle<CR>
nnoremap <Leader>ff :NERDTreeFind<CR>
" YouCompleteMe requires vim 7.3+
" Plugin 'Valloric/YouCompleteMe'
Plugin 'kien/ctrlp.vim'
let g:ctrlp_working_path_mode = 0 " dont manage working directory.
let g:ctrlp_custom_ignore = {
\ 'dir': '\v\c\.(git|svn)$',
\ 'file': '\v\c\.(swf|bak|png|gif|mov|ico|jpg|pdf)$',
\ }
Plugin 'Lokaltog/vim-powerline'
let g:Powerline_symbols = 'fancy'
highlight clear SignColumn
Plugin 'tpope/vim-surround'
" lang specific modules
Plugin 'google/yapf', { 'rtp': 'plugins/vim' }
Plugin 'ekalinin/Dockerfile.vim'
"Plugin 'davidhalter/jedi-vim'
" autocmd FileType python setlocal completeopt-=preview " dont show doc window
call vundle#end()
filetype plugin indent on " required!
"Use plug.vim to install additional plugins
call plug#begin('~/.vim/plugged')
" this assumes fzf is installed separately on ~/.apps/fzf
" see https://github.com/junegunn/fzf
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim'
noremap <C-T> :Files<CR>
noremap <Leader>t :Buffers<CR>
noremap <Leader>f :Ag<CR>
call plug#end()
""" vimrc resumes
set shell=bash
set autoindent
set backspace=indent,eol,start
set nowrap
set number
set ruler
set scrolloff=5
set cmdheight=2
set cursorcolumn
set cursorline
set errorformat=\"../../%f\"\\,%*[^0-9]%l:\ %m
set hidden
set hlsearch
set noignorecase
set incsearch
set laststatus=2
set list
set listchars=tab:>-,trail:-
set expandtab
set shiftwidth=4
set smarttab
set softtabstop=4
set cindent
"set smartindent
set showcmd
set showmatch
set t_Co=256
set tags=tags;/
set virtualedit=block
"set mouse=n
"set ttymouse=xterm2
set backupdir=/tmp
set wildmenu
set wildignore=*.exe,*.dll,*.o,*.so,*.pyc,*.back,*.jpg,*.jpeg,*.png,*.gif,*.pdf
set wildmode=list:full
set colorcolumn=80
set noswapfile
"set clipboard=unnamedplus " Copy across vim instances
set fileformat=unix " Always use LF line separators, not CRLF (prefer Unix over Windows)
set visualbell
syntax on
"colorscheme colorfulnight
" :help last-position-jump
autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g`\"" | endif
nnoremap <C-L> :noh<CR><C-L>
inoremap jj <Esc>
nnoremap <Leader>r :source ~/.vimrc<CR>
nnoremap <Leader><Leader>r :e ~/.vimrc<CR>
map <Leader>gs :Gstatus<CR>
map <Leader>gc :Gcommit<CR>
map <Leader>gm :Gcommit --amend<CR>
map <Leader>gll :Git log<CR>
map <Leader>glp :Git log -p<CR>
map <Leader>gb :Gblame<CR>
map <Leader>gdd :Git diff<CR>
map <Leader>gdm :Git diff %<CR>
map <Leader>gdf :Gdiff<CR>
map <Leader>gg :Git
nmap <F1> <Esc>
imap <F1> <Esc>
nnoremap <C-S-K> :m .-2<CR>==
nnoremap <C-S-J> :m .+1<CR>==
inoremap <C-S-J> <Esc>:m .+1<CR>==gi
inoremap <C-S-K> <Esc>:m .-2<CR>==gi
vnoremap <C-S-K> :m '<-2<CR>gv=gv
vnoremap <C-S-J> :m '>+1<CR>gv=gv
"vnoremap // y/<C-R>"<CR>
map <C-Y> :call yapf#YAPF()<cr>
imap <C-Y> <c-o>:call yapf#YAPF()<cr>
set nomodeline
set modelines=0