-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
82 lines (69 loc) · 2.02 KB
/
Copy pathvimrc
File metadata and controls
82 lines (69 loc) · 2.02 KB
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
80
81
82
"call pathogen#runtime_append_all_bundles()
set tabstop=2
set smarttab
set shiftwidth=2
set autoindent
set expandtab
set nowrap
set textwidth=80
set background=dark
set incsearch
set smartindent
set showcmd
set splitbelow
set nohlsearch
syntax on
"set statusline=%<%F%h%m%r%h%w%y\ %{&ff}\ %{strftime(\"%d/%m/%Y-%H:%M\")}%=\ col:%c%V\ ascii:%b\ pos:%o\ lin:%l\,%L\ %P
"set statusline=%<%F%h%m%r%h%w%y\ %{&ff}\ %{strftime(\"%c\",getftime(expand(\"%:p\")))}%=\ lin:%l\,%L\ col:%c%V\ pos:%o\ %ascii:%b\ %P
set statusline=%<%F%h%m%r%h%w%y\ %{&ff}\ %{strftime(\"%c\",getftime(expand(\"%:p\")))}%=\ lin:%l\,%L\ col:%c%V\ pos:%o\ %ascii:%b\ %P
set laststatus=2
let themeindex=0
map <F5> :make<Enter>
map <F4> :noh<Enter>
map <C-z> :set invnumber<Enter>
nnoremap <F2> :set invpaste paste?<CR>
set pastetoggle=<F2>
set showmode
map <C-y> ,#
map <C-t> ,$
map <C-h> <C-w>h
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-l> <C-w>l
map <C-f> {gq}
" lhs comments
map ,# :s/^/#/<CR>
map ,/ :s/^/\/\//<CR>
map ,> :s/^/> /<CR>
map ," :s/^/\"/<CR>
map ,% :s/^/%/<CR>
map ,! :s/^/!/<CR>
map ,; :s/^/;/<CR>
map ,- :s/^/--/<CR>
map ,c :s/^\/\/\\|^--\\|^> \\|^[#"%!;]//<CR>
au BufNewFile,BufRead *.rhtml set syn=eruby
au BufNewFile,BufRead *.rsel set syn=ruby
au BufNewFile,BufRead *.erb set syn=eruby
au BufNewFile,BufRead *.tex set syn=tex
augroup syntax
autocmd!
autocmd BufRead,BufNewFile *.template setfiletype cpp
augroup end
augroup commenting
autocmd!
" comment
autocmd FileType ruby,python,perl,sh map ,# :s/^/#/<CR>
autocmd FileType c,cpp map ,# :s/^/\/\//<CR>
autocmd FileType tex,matlab map ,# :s/^/%/<CR>
" uncomment
autocmd FileType ruby,python,perl,sh map ,$ :s/^#//<CR>
autocmd FileType tex,matlab map ,$ :s/^%//<CR>
autocmd FileType c,cpp map ,$ :s/^\/\///g<CR>
augroup end
augroup formating
autocmd!
autocmd BufRead,BufNewFile Makefile* set noexpandtab
autocmd BufRead *.py set noexpandtab
autocmd BufRead,BufNewFile *.txt set nosmartindent
autocmd BufRead,BufNewFile *.m set filetype=matlab
augroup end