-
Notifications
You must be signed in to change notification settings - Fork 0
/
editing
44 lines (37 loc) · 1.82 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
" Editing options
syntax on " turn on syntax highlighting
set relativenumber " show relative line numbers
set showbreak=+ " display a + at the beginning of a wrapped line
set showmatch " flash the matching bracket on inserting a )]} etc
set showmode
" 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=2 " most of the time, we want a softtabstop of 4
set shiftwidth=2 " shift by 4 spaces when using >> and <<, etc
set shiftround
set expandtab " no tabs, just spaces kthx.
set wrap " prevent text wrapping
" 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 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
" Search options
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
set gdefault " assume the /g flag on :s to replace all matches in a line
set hlsearch " do highlight previously searched phrases
let g:snippets_dir = '~/.vim/snippets'