Skip to content

Commit a6c6647

Browse files
committed
Screen program mapping is now opt-in
This as it slows down exit from insert mode for many users
1 parent 364b1c5 commit a6c6647

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

.vimrc

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -360,12 +360,16 @@
360360
" http://stackoverflow.com/a/8064607/127816
361361
vnoremap . :normal .<CR>
362362
363-
" Fix home and end keybindings for screen, particularly on mac
363+
" Fix home and end key bindings for screen, particularly on mac
364364
" - for some reason this fixes the arrow keys too. huh.
365-
map  $
366-
imap  $
367-
map  g0
368-
imap  g0
365+
" - __Note__ that this has been shown to slow down switching from insert
366+
" to normal mode (for users that don't use screen?)
367+
if exists('g:spf13_screen_mapping')
368+
map  $
369+
imap  $
370+
map  g0
371+
imap  g0
372+
end
369373

370374
" For when you forget to sudo.. Really Write the file.
371375
cmap w!! w !sudo tee % >/dev/null
@@ -570,7 +574,7 @@
570574
nnoremap <silent> <leader>gi :Git add -p %<CR>
571575
nnoremap <silent> <leader>gg :SignifyToggle<CR>
572576
"}
573-
577+
574578
" YouCompleteMe {
575579
if count(g:spf13_bundle_groups, 'youcompleteme')
576580
let g:acp_enableAtStartup = 0
@@ -582,7 +586,7 @@
582586
let g:UltiSnipsExpandTrigger = '<C-j>'
583587
let g:UltiSnipsJumpForwardTrigger = '<C-j>'
584588
let g:UltiSnipsJumpBackwardTrigger = '<C-k>'
585-
589+
586590
" Enable omni completion.
587591
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
588592
autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags

.vimrc.before

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,13 @@
8585
" let g:multi_cursor_quit_key='<Esc>'
8686
" Require a special keypress to enter multiple cursors mode
8787
" let g:multi_cursor_start_key='+'
88+
89+
" Add mappings for Unix `screen` program.
90+
" __Note!__ This has been shown to slow down exiting insert mode back to
91+
" normal mode for some users (who don't use screen?)
92+
" To enable screen mapping uncomment the following line
93+
" let g:spf13_screen_mapping = 1
94+
8895
" }
8996

9097
" Use fork before if available {

0 commit comments

Comments
 (0)