Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screen program mapping is now opt-in (as it slows down exits from insert back to normal mode) #559

Merged
merged 2 commits into from
Feb 12, 2014
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -360,12 +360,16 @@
" http://stackoverflow.com/a/8064607/127816
vnoremap . :normal .<CR>

" Fix home and end keybindings for screen, particularly on mac
" Fix home and end key bindings for screen, particularly on mac
" - for some reason this fixes the arrow keys too. huh.
map  $
imap  $
map  g0
imap  g0
" - __Note__ that this has been shown to slow down switching from insert
" to normal mode (for users that don't use screen?)
if exists('g:spf13_screen_mapping')
map  $
imap  $
map  g0
imap  g0
end

" For when you forget to sudo.. Really Write the file.
cmap w!! w !sudo tee % >/dev/null
Expand Down Expand Up @@ -570,7 +574,7 @@
nnoremap <silent> <leader>gi :Git add -p %<CR>
nnoremap <silent> <leader>gg :SignifyToggle<CR>
"}

" YouCompleteMe {
if count(g:spf13_bundle_groups, 'youcompleteme')
let g:acp_enableAtStartup = 0
Expand All @@ -582,7 +586,7 @@
let g:UltiSnipsExpandTrigger = '<C-j>'
let g:UltiSnipsJumpForwardTrigger = '<C-j>'
let g:UltiSnipsJumpBackwardTrigger = '<C-k>'

" Enable omni completion.
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
Expand Down
7 changes: 7 additions & 0 deletions .vimrc.before
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@
" let g:multi_cursor_quit_key='<Esc>'
" Require a special keypress to enter multiple cursors mode
" let g:multi_cursor_start_key='+'

" Add mappings for Unix `screen` program.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this comment is already long, but it doesn't say what this option actually does. What are we mapping here? Home and End? Does anyone know?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea. I was mostly interested in making them "go away" as they cause an almost second delay when exiting insert mode.

I could easily see simply removing the whole thing!

I don't think we should be focusing on external programs like screen and TMUX and instead leave that to the user.

" __Note!__ This has been shown to slow down exiting insert mode back to
" normal mode for some users (who don't use screen?)
" To enable screen mapping uncomment the following line
" let g:spf13_screen_mapping = 1

" }

" Use fork before if available {
Expand Down