-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
92 lines (70 loc) · 2.03 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
set nocompatible
filetype off
filetype plugin indent on
"vundle
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
"git interface
Plugin 'tpope/vim-fugitive'
"filesystem
Plugin 'scrooloose/nerdtree'
Plugin 'jistr/vim-nerdtree-tabs'
"html
Plugin 'isnowfy/python-vim-instant-markdown'
Plugin 'jtratner/vim-flavored-markdown'
Plugin 'suan/vim-instant-markdown'
Plugin 'nelstrom/vim-markdown-preview'
Plugin 'tpope/vim-surround'
"tree undo
Plugin 'sjl/gundo.vim'
"sql
Plugin 'shmup/vim-sql-syntax'
"comment
Plugin 'scrooloose/nerdcommenter'
call vundle#end()
let NERDTreeIgnore=['\.pyc$', '\~$'] "ignore files in NERDTree
map <C-n> :NERDTreeToggle<CR>
set noswapfile
set nu
set clipboard=unnamed
set colorcolumn=80
set mouse=a
highlight ColorColumn ctermbg=7 guibg=Black
"permanent undo
set undofile
set undodir=${HOME}/.vim/vim_undo
nnoremap <C-u> :GundoToggle<CR>
let g:gundo_return_on_revert=0
"python stuff
au BufRead,BufNewFile *py,*pyw,*.c,*.h
\ set tabstop=4 |
\ set softtabstop=4 |
\ set shiftwidth=4 |
\ set textwidth=79 |
\ set expandtab |
\ set autoindent |
\ set fileformat=unix |
\ set encoding=utf-8
"Use the below highlight group when displaying bad whitespace is desired.
highlight BadWhitespace ctermbg=red guibg=red
"Display tabs at the beginning of a line in Python mode as bad.
au BufRead,BufNewFile *.py,*.pyw match BadWhitespace /^\t\+/
"Make trailing whitespace be flagged as bad.
au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/
" For full syntax highlighting:
let python_highlight_all=1
syntax on
" Keep indentation level from previous line:
autocmd FileType python set autoindent
" make backspaces more powerfull
set backspace=indent,eol,start
"Folding based on indentation:
autocmd FileType python set foldmethod=indent
"use space to open folds
nnoremap <space> za
"js stuff
autocmd FileType javascript setlocal shiftwidth=2 tabstop=2
"bash
autocmd FileType sh setlocal shiftwidth=4 tabstop=4
autocmd FileType sql setlocal shiftwidth=2 tabstop=2