forked from bleything/dotvim
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathediting
79 lines (69 loc) · 3.53 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
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
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"""
""" Ben Bleything's Vim Setup
""" Based on the work of many others. See README.rdoc for credits.
"""
""" Git Hubs: http://github.com/bleything/dotvim
""" Internet Electronic Mail: [email protected]
"""
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""" E D I T I N G O P T I O N S
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
syntax on " turn on syntax highlighting
set number " show line numbers
"set showbreak=+ " display a + at the beginning of a wrapped line
"set showmatch " flash the matching bracket on inserting a )]} etc
" allow backspacing over everything in insert mode
set backspace=indent,eol,start
""" FIXME: everything works as expected without these, I'm sure
""" that I'm just missing something
"set cindent " c-style language indentation
"set autoindent " automatically indent new lines
"set smartindent " automatically indent new lines
" for most code, use 4 space indents. specific filetypes are overridden
" in filetypes.vimrc
set softtabstop=4 " most of the time, we want a softtabstop of 4
set tabstop=4 " display tabs as 4 characters wide
set shiftwidth=4 " shift by 4 spaces when using >> and <<, etc
set expandtab " no tabs, just spaces kthx.
" Using autocmd for this allows it to be reset every time you open a
" file, which keeps overrides from being persistent
" This makes tab switching very very slow, so I ended up disabling it.
"autocmd FileType * set softtabstop=4 tabstop=4 shiftwidth=4 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
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""" F I L E T Y P E O P T I O N S
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
filetype on " Enable filetype detection
filetype indent on " Enable filetype-specific indenting
filetype plugin on " Enable filetype-specific plugins
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""" F O L D I N G O P T I O N S
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set foldenable " enable folding
set foldmethod=indent " use the syntax definitions' folding
set foldlevelstart=99 " start with all folds open when switching buffers
"set foldcolumn=3 " adds two columns of fold status on the left-hand
" side of the screen
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""" S E A R C H O P T I O N S
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set ignorecase " makes search patterns case-insensitive by default
set smartcase " overrides ignorecase when the pattern contains
" upper-case characters
set incsearch " incremental search. 'nuf said
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""" S W A P A N D U N D O O P T I O N S
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set directory=~/.vim/swapfiles,/var/tmp,/tmp,.
" enable persistent undo
if has("persistent_undo")
set undofile
set undodir=~/.vim/undofiles,/var/tmp,/tmp,.
endif