-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
74 lines (53 loc) · 2.05 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
filetype plugin indent on
" Number of spaces that a pre-existing tab is equal to.
" For the amount of space used for a new tab use shiftwidth.
au BufRead,BufNewFile *py,*pyw,*.c,*.h set tabstop=4
" What to use for an indent.
au BufRead,BufNewFile *.py,*pyw set shiftwidth=4
au BufRead,BufNewFile *.py,*.pyw set expandtab
set shiftwidth=4
set expandtab
" 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\+$/
" Wrap text after a certain number of characters
" Python: 79
au BufRead,BufNewFile *.py,*.pyw, set textwidth=79
" Use UNIX (\n) line endings.
" Only used for new files so as to not force existing files to change their
" line endings.
" Python: yes
au BufNewFile *.py,*.pyw set fileformat=unix
" ----------------------------------------------------------------------------
" The following section contains suggested settings. While in no way required
" to meet coding standards, they are helpful.
" Set the default file encoding to UTF-8:
set encoding=utf-8
" Puts a marker at the beginning of the file to differentiate between UTF and
" UCS encoding (WARNING: can trick shells into thinking a text file is actually
" a binary file when executing the text file): ``set bomb``
" For full syntax highlighting:
let python_highlight_all=1
syntax on
" Automatically indent based on file type:
filetype indent on
" Keep indentation level from previous line:
set autoindent
" Folding based on indentation:
"set foldmethod=indent"
" Line numbers"
set number
"highlight search terms"
set hls
"pathogen package manager"
"execute pathogen#infect()
set showcmd " show comman in bottom bar
set wildmenu " visual autocomplete for command menu
set showmatch " highlight matching [{()}]
" move vertically by visual line
nnoremap j gj
nnoremap k gk
set paste