blob: 8cf2ee613b3332f20e7c89c3822ca0cbe9dc32d4 (
plain) (
blame)
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
|
filetype plugin on
filetype indent on
set autoread
set wildmenu
set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store
set hlsearch
set incsearch
set magic
set encoding=utf8
set ffs=unix,dos,mac
set noswapfile
set mouse=a
set path+=**
" Default to modern indenting
set autoindent
set smartindent
set expandtab
set shiftwidth=4
set tabstop=4
set softtabstop=4
" Return to last edit position when opening files
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
" Disable highlight when <leader><cr> is pressed
map <silent> <leader><cr> :noh<cr>
" :W sudo saves the file
command W w !sudo tee % > /dev/null
" Toggle displaying special characters
map <leader><tab> :call ToggleListChars()<cr>
let g:list_chars_enabled = 0
function! ToggleListChars()
if g:list_chars_enabled
:set nolist
:set listchars=eol:$
let g:list_chars_enabled = 0
else
:set list
:set listchars=tab:→\ ,space:·,nbsp:␣,trail:•,eol:¶,precedes:«,extends:»
let g:list_chars_enabled = 1
endif
endfunction
|