-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.vimrc.local
More file actions
94 lines (75 loc) · 3.2 KB
/
.vimrc.local
File metadata and controls
94 lines (75 loc) · 3.2 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
84
85
86
87
88
89
90
91
92
93
" Don't use VI compatibility mode
:set nocompatible
"colorscheme vividchalk
"colorscheme molokai
colorscheme candy
set background=dark
set nocursorline
highlight clear spellBad
highlight spellBad cterm=underline
" Fix neocomplcache nonsense with automatically showing the autocomplete box
" and make Ctrl+Space the autocomplete key (instead of the default spf-13 ESC)
" map <Tab> in insert mode to regular tab behaviour.
let g:neocomplcache_disable_auto_complete = 1
iunmap <Tab>
" Disable popup window on cursor moved in insert mode
let g:neocomplete#enable_at_startup = 0
" inoremap <expr><Tab> pumvisible() ? "\<C-n>" : <SID>check_back_space() ? "\<TAB>" : "\<C-x>\<C-u>"
inoremap <expr> <C-Space> pumvisible() \|\| &omnifunc == '' ?
\ "\<lt>C-n>" :
\ "\<lt>C-x>\<lt>C-o><c-r>=pumvisible() ?" .
\ "\"\\<lt>c-n>\\<lt>c-p>\\<lt>c-n>\" :" .
\ "\" \\<lt>bs>\\<lt>C-n>\"\<CR>"
imap <C-@> <C-Space>
" Some autocomplete popup menu definitions taken from:
" http://vim.wikia.com/wiki/Make_Vim_completion_popup_menu_work_just_like_in_an_IDE
" Vim's popup menu doesn't select the first completion item, but rather just inserts
" the longest common text of all matches; the menu will come up even if there's only one match
let g:acp_enableAtStartup = 0
set completeopt=longest,menuone
" Enter key will select the highlighted menu item when the autocomplete menu is open
inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
" better navigation in autocomplete menu
inoremap <expr> <C-n> pumvisible() ? '<C-n>' :
\ '<C-n><C-r>=pumvisible() ? "\<lt>Down>" : ""<CR>'
inoremap <expr> <M-,> pumvisible() ? '<C-n>' :
\ '<C-x><C-o><C-n><C-p><C-r>=pumvisible() ? "\<lt>Down>" : ""<CR>'
function! s:check_back_space()"{{{
let col = col('.') - 1
return !col || getline('.')[col - 1] =~ '\s'
endfunction""}}}"
" Make program definition and keyboard shortcuts (f2 to close function definitions window)
" set makeprg=make " Should already be set by default. To test: 'set makeprg?'
map <f7> :make<cr>
map <f4> :cnext<Cr>
map <f3> :cprevious<cr>
map <f12> :close<cr>
map <f2> <C-W>q
" Map F5 to a simple menu of buffers
nnoremap <F5> :buffers<CR>:buffer<Space>
" Absolute line numbers instead of relative numbering in Insert mode, usually
" fine by default.
"autocmd InsertEnter * :set number
"autocmd InsertLeave * :set relativenumber
" Disable annoying closing of quotes, braces, tags, etc.
UnBundle 'spf13/vim-autoclose'
UnBundle 'amirh/HTML-AutoCloseTag'
let g:autoclose_on = 0
" start out files with all folds opened
autocmd Syntax * normal zR
let g:DisableAutoPHPFolding = 1
set shiftwidth=4 " Use indents of 4 spaces
set tabstop=4 " An indentation every two columns
set softtabstop=4 " Let backspace delete indent
" the following lines from the spf vimrc cause delays in mode switching
" couldn't figure out a way to fix this aside from commenting the lines
" in the main .spf-13 .vimrc
"map ^[[F $
"imap ^[[F ^O$
"map ^[[H g0
"imap ^[[H ^Og0
" replace parts of airline status bar we aren't using with information we can
let g:airline_section_b = '%{getcwd()}'
let g:airline_section_c = '%t'
" don't display indent guides on startup ( enable with ,ig )
let g:indent_guides_enable_on_vim_startup = 0