mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-02-09 20:26:37 +01:00
Map delete key to delete visual selection
Also update the help. The delete key used to be hard coded in the source but now it is mapped in MacVim's gvimrc file instead.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
*gui_mac.txt* For Vim version 7.3. Last change: 2010 Dec 28
|
||||
*gui_mac.txt* For Vim version 7.3. Last change: 2011 Jul 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bjorn Winckler
|
||||
@@ -594,10 +594,17 @@ Alt-Up Move cursor one paragraph forward (see |alt-movement|).
|
||||
Alt-Down Move cursor to the previous paragraph
|
||||
(see |alt-movement|).
|
||||
|
||||
*delete-key* *macvim-<Backspace>*
|
||||
Delete key Delete selection in visual mode. (This overrides the
|
||||
default behavior of moving the cursor left.)
|
||||
Note that the key labeled "delete" on a Mac keyboard
|
||||
is known to Vim as <Backspace>.
|
||||
|
||||
*cmd-movement* *alt-movement*
|
||||
The above mappings involving Cmd/Alt + arrow key are enabled by default in the
|
||||
system gvimrc file "$VIM/gvimrc". You can quickly disable all of these by
|
||||
adding the following lines to your "~/.vimrc" (not .gvimrc) file: >
|
||||
The above mappings involving Cmd/Alt + arrow key (including the delete key)
|
||||
are enabled by default in the system gvimrc file "$VIM/gvimrc". You can
|
||||
disable all of these by adding the following lines to your "~/.vimrc" (not
|
||||
.gvimrc) file: >
|
||||
if has("gui_macvim")
|
||||
let macvim_skip_cmd_opt_movement = 1
|
||||
endif
|
||||
|
||||
@@ -5293,6 +5293,7 @@ definition-search tagsrch.txt /*definition-search*
|
||||
definitions intro.txt /*definitions*
|
||||
delete() eval.txt /*delete()*
|
||||
delete-insert change.txt /*delete-insert*
|
||||
delete-key gui_mac.txt /*delete-key*
|
||||
delete-menus gui.txt /*delete-menus*
|
||||
deleting change.txt /*deleting*
|
||||
design-assumptions develop.txt /*design-assumptions*
|
||||
@@ -6609,6 +6610,7 @@ mac-vimfile os_mac.txt /*mac-vimfile*
|
||||
macintosh os_mac.txt /*macintosh*
|
||||
macro map.txt /*macro*
|
||||
macvim gui_mac.txt /*macvim*
|
||||
macvim-<Backspace> gui_mac.txt /*macvim-<Backspace>*
|
||||
macvim-backspace gui_mac.txt /*macvim-backspace*
|
||||
macvim-clientserver remote.txt /*macvim-clientserver*
|
||||
macvim-colors gui_mac.txt /*macvim-colors*
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" System gvimrc file for MacVim
|
||||
"
|
||||
" Maintainer: Bjorn Winckler <bjorn.winckler@gmail.com>
|
||||
" Last Change: Sun Aug 29 2009
|
||||
" Last Change: Tue Jul 26 2011
|
||||
"
|
||||
" This is a work in progress. If you feel so inclined, please help me improve
|
||||
" this file.
|
||||
@@ -63,6 +63,10 @@ if !exists("macvim_skip_cmd_opt_movement")
|
||||
|
||||
imap <M-BS> <C-w>
|
||||
imap <D-BS> <C-u>
|
||||
|
||||
" Make the 'delete' key delete selection in visual+select mode instead of
|
||||
" moving cursor to the left.
|
||||
vmap <Backspace> d
|
||||
endif " !exists("macvim_skip_cmd_opt_movement")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user