-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.vimrc
More file actions
89 lines (62 loc) · 2.1 KB
/
Copy path.vimrc
File metadata and controls
89 lines (62 loc) · 2.1 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
set t_Co=256
" probably only works consistently with iTerm2
set term=xterm-256color
set nocompatible
filetype plugin indent on
" disable swap files - live dangerously
set noswapfile
" show line numbers
set number
" enable syntax highlighting
syntax enable
set backspace=indent,eol,start
" set file name previewing/completion options (eg, for opening files)
set wildmode=longest,list,full
set wildmenu
" set tabs to have 4 spaces
set tabstop=4
" expand tabs into spaces
set expandtab
" when using the >> or << commands, shift lines by 4 spaces
set shiftwidth=4
" show a visual line under the cursor's current line
"set cursorline
" show the matching part of the pair for [] {} and ()
set showmatch
" indent when moving to the next line while writing code
set autoindent
" just better in general
set background=dark
" the default comment color makes puppies cry
hi Comment ctermfg=DarkGreen
hi String ctermfg=DarkRed
""" python stuff
"" Number of spaces that a pre-existing tab is equal to.
au BufRead,BufNewFile *py,*pyw,*.c,*.h set tabstop=4
"spaces for indents
au BufRead,BufNewFile *.py,*pyw set shiftwidth=4
au BufRead,BufNewFile *.py,*.pyw set expandtab
au BufRead,BufNewFile *.py set softtabstop=4
" 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 *.html,*.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/
" Wrap text after a certain number of characters
"au BufRead,BufNewFile *.py,*.pyw, set textwidth=100
" Use UNIX (\n) line endings.
au BufNewFile *.py,*.pyw,*.c,*.h set fileformat=unix
" Set the default file encoding to UTF-8:
set encoding=utf-8
" For full syntax highlighting:
let python_highlight_all=1
" Keep indentation level from previous line:
autocmd FileType python set autoindent
" folding stuff
" toggle current fold: za
" un/fold all: zR/zM
"set foldmethod=indent
"set foldnestmax=2
"hi Folded ctermbg=black
"hi Folded ctermfg=darkgrey