# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
# 
# The contents of this file are subject to the Mozilla Public License
# Version 1.1 (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
# 
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
# License for the specific language governing rights and limitations
# under the License.
# 
# The Original Code is Komodo code.
# 
# The Initial Developer of the Original Code is ActiveState Software Inc.
# Portions created by ActiveState Software Inc are Copyright (C) 2000-2007
# ActiveState Software Inc. All Rights Reserved.
# 
# Contributor(s):
#   ActiveState Software Inc
# 
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
# 
# ***** END LICENSE BLOCK *****

#VI key bindings for Komodo

# Movement commands
binding cmd_vim_left  h
binding cmd_vim_right  l
binding cmd_vim_right  Space
binding cmd_vim_linePrevious  k
binding cmd_vim_linePrevious  Ctrl+P
binding cmd_vim_lineNext  j
binding cmd_vim_linePreviousHome  -
binding cmd_vim_wordLeft  b
binding cmd_vim_wordRight  w
binding cmd_vim_wordRightEnd  e
binding cmd_vim_homeAbsolute 0
binding cmd_vim_homeAbsolute |
binding cmd_vim_home ^
binding cmd_vim_end $
binding cmd_vim_wordRightPastPunctuation  W
binding cmd_vim_wordLeftPastPunctuation  B
binding cmd_vim_wordRightEndPastPunctuation  E
# Larger moves
binding cmd_vim_moveToScreenTop  H
binding cmd_vim_moveToScreenCenter  M
binding cmd_vim_moveToScreenBottom  L
binding cmd_vim_moveSentenceBegin (
binding cmd_vim_moveSentenceEnd   )
binding cmd_vim_moveParagraphBegin {
binding cmd_vim_moveParagraphEnd   }
binding cmd_vim_moveFunctionPrevious [ [
binding cmd_vim_moveFunctionNext     ] ]
# History moves
binding cmd_vim_jumpToLineBeforeLastJump ' '
binding cmd_vim_jumpToLocBeforeLastJump ` `

# Scrolling movements
binding cmd_vim_scrollHalfPageDown  Ctrl+D
binding cmd_vim_scrollHalfPageUp  Ctrl+U
binding cmd_vim_pageDown  Ctrl+F
binding cmd_vim_pageUp  Ctrl+B
binding cmd_vim_gotoLine  G
binding cmd_vim_documentHome  g g
binding cmd_vim_lineScrollUp  Ctrl+Y
binding cmd_vim_lineScrollDown  Ctrl+E

# Select commands

# Copy commands
binding cmd_vim_yankLine Y
binding cmd_vim_yankOperation y

# Paste commands
binding cmd_vim_paste P
binding cmd_vim_pasteAfter p

# Insert mode commands
binding cmd_vim_insert i
binding cmd_vim_insertHome I
binding cmd_vim_append a
binding cmd_vim_appendEnd A
binding cmd_vim_insert_newline_previous  O
binding cmd_vim_insert_newline_next  o

# Change commands
binding cmd_vim_changeChar  s
binding cmd_vim_changeLine  S
binding cmd_vim_changeOperation c
binding cmd_vim_changeLineEnd  C
binding cmd_vim_replaceChar  r
binding cmd_vim_overtype  R

# Delete commands
binding cmd_vim_cutChar x
binding cmd_vim_cutCharLeft  X
binding cmd_vim_deleteOperation d
binding cmd_vim_lineCutEnd D

# XXX - Fixme (delete to end of file): binding cmd_vim_deleteLineToEnd  dG

# Search commands
binding cmd_vim_findNext  n
binding cmd_vim_findPrevious  N
binding cmd_vim_enterSearchForward /
binding cmd_vim_enterSearchBackward ?
binding cmd_vim_findCharInLine  f
binding cmd_vim_findPreviousCharInLine  F
binding cmd_vim_findCharInLinePosBefore  t
binding cmd_vim_findPreviousCharInLinePosAfter  T
binding cmd_vim_repeatLastFindCharInLine  ;
binding cmd_vim_repeatLastFindCharInLineReversed  ,
binding cmd_vim_findWordUnderCursor  *
binding cmd_vim_findWordUnderCursorBack  #

# Visual mode commands
binding cmd_vim_toggleVisualMode v
binding cmd_vim_toggleVisualLineMode V
binding cmd_vim_toggleVisualBlockMode Ctrl+V

# Folding commands
binding cmd_foldExpand z o
binding cmd_foldExpandAll z R
binding cmd_foldCollapse z c
binding cmd_foldCollapseAll z M
binding cmd_foldToggle z a

# Special commands
binding cmd_vim_cancel Ctrl+[
binding cmd_vim_undo u
binding cmd_vim_redo Ctrl+R
binding cmd_vim_join J
binding cmd_vim_swapCase ~
binding cmd_vim_jumpToMatchingBrace  %
binding cmd_vim_enterCommandMode :
binding cmd_vim_repeatLastCommand .
binding cmd_vim_dedentOperation <
binding cmd_vim_indentOperation >
binding cmd_vim_saveAndClose Z Z
binding cmd_vim_closeNoSave Z Q

# Register commands
binding cmd_vim_setRegister "

# Additional commands needed due to case sensitive behaviour if vi
# Projects
binding cmd_refreshStatus Ctrl+K r

