-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
45 lines (38 loc) · 1.08 KB
/
vimrc
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
filetype off
call pathogen#helptags()
call pathogen#runtime_append_all_bundles()
filetype plugin on
" Read-only .doc through antiword
autocmd BufReadPre *.doc silent set ro
autocmd BufReadPost *.doc silent %!antiword "%"
" Read-only odt/odp through odt2txt
autocmd BufReadPre *.odt,*.odp silent set ro
autocmd BufReadPost *.odt,*.odp silent %!odt2txt "%"
" Read-only pdf through pdftotext
autocmd BufReadPre *.pdf silent set ro
autocmd BufReadPost *.pdf silent %!pdftotext -nopgbrk -layout -q -eol unix "%" - | fmt -w78
" Read-only rtf through unrtf
autocmd BufReadPre *.rtf silent set ro
autocmd BufReadPost *.rtf silent %!unrtf --text
set number
set t_Co=256
syntax on
set hlsearch
set nocompatible
set modeline
set autoindent
set showmode
set hidden
set wildmenu
set visualbell
set cursorline
set ttyfast
set ruler
" set undofile
set ignorecase
colorscheme dante
" Mappings
nnoremap <F3> :GundoToggle<CR>
map <F4> :w !sudo tee %
" For indented code
map <F5> <Esc> :perl use Text::FindIndent;VIM::DoCommand($_) for Text::FindIndent->to_vim_commands(join "\n", $curbuf->Get(1..$curbuf->Count()));<CR>