-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
159 lines (133 loc) · 5.19 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
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
156
157
158
159
autocmd! bufwritepost .vimrc sourc %
set pastetoggle=<F2>
set clipboard=unnamed
set mouse=a " on OSX press Option + Click
set backspace=indent,eol,start " make backspace work like most other apps
"set bs=2 " make backspace behave like backspace
let mapleader = "," " Rebind <Leader> Key
" bind Ctrl+<move_keys> to move around the windows, instead of Ctrl+w+<move_keys>
map <c-j> <c-w>j
map <c-k> <c-w>k
map <c-l> <c-w>l
map <c-h> <c-w>h
" remap moving between tabs
map <Leader>n <esc>:tabprevious<CR>
map <Leader>m <esc>:tabnext<CR>
" map sort function
vnoremap <Leader>s :sort<CR>
" move text blocks around
vnoremap < <gv
vnoremap > >gv
" Syntax highlighting
filetype off
filetype plugin indent on
syntax on
" Showing line numbers and length
set number " show line numbers
set tw=79 " width of document (used by gd)
set nowrap " don't automatically wrap on load
set fo-=t " don't automatically wrap text when typing
set colorcolumn=80
highlight ColorColumn ctermbg=233
set history=700
set undolevels=700
set tabstop=4
set softtabstop=4
set shiftwidth=4
set shiftround
set expandtab
set hlsearch
set incsearch
set ignorecase
set smartcase
" no vim swap files
"set nobackup
"set nowritebackup
"set noswapfile
set ruler
colorscheme elflord
" Pathogen setup
" mkdir -p ~/.vim/autoload ~/.vim/bundle && \
" curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
"execute pathogen#infect()
call pathogen#infect()
" autoload NerdTree
" cd ~/.vim/bundle
" git clone https://github.com/scrooloose/nerdtree.git
" autocmd vimenter * NERDTree
let NERDTreeShowHidden=1
let g:nerdtree_tabs_open_on_console_startup=0
let g:nerdtree_tabs_open_on_gui_startup=0
let g:nerdtree_tabs_open_on_new_tab=0
" let g:NERDTreeHijackNetrw=0
" autoload NerdTreeTabs
" cd ~/.vim/bundle
" git clone https://github.com/jistr/vim-nerdtree-tabs.git
map <C-n> :NERDTreeTabsToggle<CR>
" vim-powerline plugin settings
" cd ~/.vim/bundle
" git clone https://github.com/Lokaltog/vim-powerline.git
" Then read vim-powerline/fontpatcher/README.rst to patch fonts, or install and
" use mine
" let g:miniBufExplForceSyntaxEnable = 1
let g:Powerline_symbols = 'fancy'
set laststatus=2
set t_Co=256
" ctrlp settings
" $ cd ~/.vim/bundle
" $ git clone https://github.com/kien/ctrlp.vim.git
let g:ctrlp_max_height = 30
set wildignore+=*.pyc
set wildignore+=*_build/*
set wildignore+=*/coverage/*
" jedi-vim settings
" cd ~/.vim/bundle/ && git clone --recursive https://github.com/davidhalter/jedi-vim.git
" sudo pip install jedi
let g:jedi#usages_command = "<leader>z"
let g:jedi#popup_on_dot = 0
let g:jedi#popup_select_first = 0
"map <Leader>b Oimport ipdb; ipdb.set_trace() # BREAKPOINT<C-c>
" python-mode plugin settings
" cd ~/.vim/bundle
" git clone git://github.com/klen/python-mode.git
" sudo pip install rope ropemode ropevim
map <Leader>g :call RopeGotoDefinition()<CR>
"let g:pymode_rope = 0
let g:pymode_rope_regenerate_on_write = 0
let g:pymode_rope_autoimport = 0
let g:pymode_rope_lookup_project = 0
let g:pymode_rope_complete_on_dot = 0
let ropevim_enable_shortcuts = 1
let g:pymode_rope_goto_def_newwin = "vnew"
let g:pymode_rope_extended_complete = 0
let g:pymode_breakpoint = 0
let g:pymode_syntax = 1
let g:pymode_syntax_builtin_objs = 0
let g:pymode_syntax_builtin_funcs = 0
let g:pymode_python = 'python3'
map <Leader>b Oimport ipdb; ipdb.set_trace() # BREAKPOINT<C-c>
" Better navigating through omnicomplete option list
" " See
" http://stackoverflow.com/questions/2170023/how-to-map-keys-for-popup-menu-in-vim
"
set completeopt=longest,menuone
function! OmniPopup(action)
if pumvisible()
if a:action == 'j'
return "\<C-N>"
elseif a:action == 'k'
return "\<C-P>"
endif
endif
return a:action
endfunction
inoremap <silent><C-j> <C-R>=OmniPopup('j')<CR>
inoremap <silent><C-k> <C-R>=OmniPopup('k')<CR>
" Python code block folding
" wget -O ~/.vim/ftplugin/python_editing.vim http://www.vim.org/scripts/download_script.php?src_id=5492
set nofoldenable
"set ai " auto indenting
"set background=dark " Makes dark fonts pop on dark terminal
"filetype plugin on " use the file type plugins
"
"Plugin 'Yggdroot/indentLine'