-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc.erb
More file actions
83 lines (70 loc) · 2.68 KB
/
vimrc.erb
File metadata and controls
83 lines (70 loc) · 2.68 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
83
call pathogen#runtime_append_all_bundles()
call pathogen#helptags()
call pathogen#infect()
set nocompatible
set autoindent
set tabstop=8
set softtabstop=2
set shiftwidth=2
set expandtab
set sts=2
set showmatch
set ruler
set laststatus=2
<%= 'set statusline=%<%F%h%m%r%h%w%y\ [%{&ff}]\ [%{&encoding}]\ %{fugitive#statusline()}\ %{rvm#statusline()}\ [%{strftime(\"%d/%m/%y\ -\ %H:%M\",getftime(expand(\"%:p\")))}]%=\ [lin:%l\,%L]\ [col:%c%V]\ [pos:%o]\ [ascii:%b]\ %P' %>
set pastetoggle=<F11>
set hidden
let mapleader = ","
let g:mapleader = ","
set history=1000
set wildmenu
set wildmode=list:longest
set ignorecase
set smartcase
set scrolloff=3
set incsearch
set shortmess=atI
nmap <silent> <leader>n :silent :nohlsearch<CR>
map <leader>e :e! ~/.vimrc<cr>
"Quickly open a buffer for scribble
map <leader>q :e ~/.vim/tmp/buffer<cr>
map <leader>h <C-]>
nnoremap <silent> <leader>p :YRShow<CR>
"Paste from X clipboard
map <leader>x :r!xsel<CR>
filetype on " Enable filetype detection
filetype indent on " Enable filetype-specific indenting
filetype plugin on " Enable filetype-specific plugins
autocmd FileType ruby,eruby set omnifunc=rubycomplete#Complete
autocmd FileType ruby,eruby let g:rubycomplete_buffer_loading = 1
autocmd FileType ruby,eruby let g:rubycomplete_classes_in_global = 1
autocmd FileType ruby,eruby let g:rubycomplete_rails = 1
autocmd FileType ruby,eruby let g:rubycomplete_rails_proactive = 1
" -- begin template config --
" usage: <leader>nt
let g:vt_no_default_mappings = 1
nmap <leader>nt <Plug>(vimtemplate-open)
let g:vt_template_dir_path = expand("$HOME/.vim/template")
let g:vt_command = ""
let g:vt_author = "<%= print("Your Name: "); STDOUT.flush; STDIN.gets.chomp %>"
let g:vt_email = "<%= print("Your Email: "); STDOUT.flush; STDIN.gets.chomp %>"
let s:files_tmp = {
\'skel.html' : "html",
\'skel.ruby' : "rb",
\'skel.sh' : "sh"
\}
let g:vt_filetype_files = join(map(keys(s:files_tmp), 'v:val . "=" . s:files_tmp[v:val]'), ',')
unlet s:files_tmp
" -- end template config --
imap <F12> <%= '<%= %%>' %>
" Convenient command to see the difference between the current buffer and the
" file it was loaded from, thus the changes you made.
command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis
\ | wincmd p | diffthis
let g:yankring_history_file = '.vim/tmp/yankring_history.txt'
let g:dbext_default_history_file = '.vim/tmp/dbext_sql_history.txt'
let g:dbext_default_profile_DEFAULT_PG = 'type=PGSQL:user=pjpp:passwd=@askg:dbname=pjpp_dev'
let g:dbext_default_profile_CUSTOM_PG = 'type=PGSQL:port=5843:user=pjpp:passwd=@askg:dbname=pjpp_dev'
let g:dbext_default_profile = 'DEFAULT_PG'
" Enable matchit plugin
runtime macros/matchit.vim