-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathediting
46 lines (38 loc) · 1.66 KB
/
editing
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
"EDITING OPTIONS
syntax on
set number " line numbers
set showbreak=+ " display a + at the beginning of a wrapped line
set showmatch " flash the matching bracket on inserting a )]} etc
set nospell
" allow backspacing over everything in insert mode
set backspace=indent,eol,start
" show tab and trailing spaces
set list listchars=tab:»»,trail:·
set softtabstop=2 " most of the time, we want a softtabstop of 2
set tabstop=2 " show tabs with 2 spaces
set shiftwidth=2 " shift by 2 spaces when using >> and <<, etc
set expandtab " no tabs
" Using autocmd for this allows it to be reset every time you open a
" file, which keeps overrides from being persistent
autocmd FileType * set softtabstop=2 shiftwidth=2 tabstop=2 expandtab
set list " show whitespace
set listchars=tab:»·,trail:· " show tabs and trailing spaces
set listchars+=extends:» " show a » when a line goes off the right edge of the screen
set listchars+=precedes:« " show a « when a line goes off the left edge of the screen
"FOLDING OPTIONS
set foldenable " enable folding
set foldlevelstart=0 " start with all folds collapsed when switching buffers
set foldcolumn=0 " adds two columns of fold status on the left-hand side of the screen
"SEARCH OPTIONS
set ignorecase " makes search patterns case-insensitive by default
set smartcase " overrides ignorecase when the pattern contains upper-case characters
set incsearch
"SWAP & UNDO OPTIONS
" global swapfile directory
set noswapfile "no swap file bitch
set directory=~/.vim/swapfiles,/var/tmp,/tmp,.
" persistent undo
if has("persistent_undo")
set undofile
set undodir=~/.vim/undofiles,/var/tmp,/tmp,.
endif