forked from patriciomacadden/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.vimrc
More file actions
executable file
·61 lines (52 loc) · 1.28 KB
/
.vimrc
File metadata and controls
executable file
·61 lines (52 loc) · 1.28 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
" reload .vimrc automatically
autocmd! bufwritepost .vimrc source %
" indentation configuration
set tabstop=2
set shiftwidth=2
set expandtab
set autoindent
set smartindent
set nobackup
set noswapfile
set nowritebackup
set cm=blowfish2
" show tabs and trailing spaces
set list
set listchars=tab:>-,trail:-
" linewidth (endless)
set textwidth=0
" do not wrap lines automatically
set nowrap
function! InsertTabWrapper()
let col = col('.') - 1
if !col || getline('.')[col - 1] !~ '\k'
return "\<tab>"
else
return "\<c-p>"
endif
endfunction
" remap the tab key to select action with InsertTabWrapper
inoremap <tab> <c-r>=InsertTabWrapper()<cr>
" case insensitive searches
"set ignorecase
" incremental search
set incsearch
" show mode
set showmode
" show line and column information
set ruler
" show matching brackets
set showmatch
set formatoptions=tcqor
set whichwrap=b,s,<,>,[,]
" always show the tabline
set showtabline=2
" smart home
noremap <expr> <Home> (col('.') == matchend(getline('.'), '^\s*')+1 ? '0' : '^')
imap <Home> <C-o><Home>
"noremap <expr> <End> (col('.') == match(getline('.'), '\s*$') ? '$' : 'g_')
"vnoremap <expr> <End> (col('.') == match(getline('.'), '\s*$') ? '$h' : 'g_')
"imap <End> <C-o><End>
" colorscheme
colorscheme railscasts
syntax on