mirror of
https://github.com/gryf/python.vim.git
synced 2025-12-17 11:30:22 +01:00
Version 1.10: Add shortcuts for commenting/uncommenting selections.
This commit is contained in:
committed by
Able Scraper
parent
6dbc984278
commit
ef20af29a9
@@ -1,8 +1,8 @@
|
|||||||
" -*- vim -*-
|
" -*- vim -*-
|
||||||
" FILE: python.vim
|
" FILE: python.vim
|
||||||
" LAST MODIFICATION: 2006-08-18 07:30
|
" LAST MODIFICATION: 2006-11-07 4:29pm
|
||||||
" (C) Copyright 2001-2005 Mikael Berthe <bmikael@lists.lilotux.net>
|
" (C) Copyright 2001-2005 Mikael Berthe <bmikael@lists.lilotux.net>
|
||||||
" Version: 1.9
|
" Version: 1.10
|
||||||
|
|
||||||
" USAGE:
|
" USAGE:
|
||||||
"
|
"
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
" shift commands...
|
" shift commands...
|
||||||
"
|
"
|
||||||
" REQUIREMENTS:
|
" REQUIREMENTS:
|
||||||
" vim (>= 6)
|
" vim (>= 7)
|
||||||
"
|
"
|
||||||
" Shortcuts:
|
" Shortcuts:
|
||||||
" [[ -- Jump to beginning of block
|
" [[ -- Jump to beginning of block
|
||||||
@@ -28,6 +28,8 @@
|
|||||||
" ]v -- Select (Visual Line Mode) block
|
" ]v -- Select (Visual Line Mode) block
|
||||||
" ]< -- Shift block to left
|
" ]< -- Shift block to left
|
||||||
" ]> -- Shift block to right
|
" ]> -- Shift block to right
|
||||||
|
" ]# -- Comment selection
|
||||||
|
" ]u -- Uncomment selection
|
||||||
" ]c -- Select current/previous class
|
" ]c -- Select current/previous class
|
||||||
" ]f -- Select current/previous function
|
" ]f -- Select current/previous function
|
||||||
" ]<up> -- Jump to previous line with the same/lower indentation
|
" ]<up> -- Jump to previous line with the same/lower indentation
|
||||||
@@ -45,6 +47,11 @@ vmap ]< <
|
|||||||
map ]> [[V]]>
|
map ]> [[V]]>
|
||||||
vmap ]> >
|
vmap ]> >
|
||||||
|
|
||||||
|
map ]# :call PythonCommentSelection()<CR>
|
||||||
|
vmap ]# :call PythonCommentSelection()<CR>
|
||||||
|
map ]u :call PythonUncommentSelection()<CR>
|
||||||
|
vmap ]u :call PythonUncommentSelection()<CR>
|
||||||
|
|
||||||
map ]c :call PythonSelectObject("class")<CR>
|
map ]c :call PythonSelectObject("class")<CR>
|
||||||
map ]f :call PythonSelectObject("function")<CR>
|
map ]f :call PythonSelectObject("function")<CR>
|
||||||
|
|
||||||
@@ -72,14 +79,14 @@ nmenu <silent> &Python.Shift\ Block\ Right<Tab>]>
|
|||||||
vmenu <silent> &Python.Shift\ Block\ Right<Tab>]>
|
vmenu <silent> &Python.Shift\ Block\ Right<Tab>]>
|
||||||
\]>
|
\]>
|
||||||
nmenu &Python.-Sep3- :
|
nmenu &Python.-Sep3- :
|
||||||
vmenu <silent> &Python.Comment\ Selection
|
vmenu <silent> &Python.Comment\ Selection<Tab>]#
|
||||||
\:call PythonCommentSelection()<CR>
|
\]#
|
||||||
nmenu <silent> &Python.Comment\ Selection
|
nmenu <silent> &Python.Comment\ Selection<Tab>]#
|
||||||
\:call PythonCommentSelection()<CR>
|
\]#
|
||||||
vmenu <silent> &Python.Uncomment\ Selection
|
vmenu <silent> &Python.Uncomment\ Selection<Tab>]u
|
||||||
\:call PythonUncommentSelection()<CR>
|
\]u
|
||||||
nmenu <silent> &Python.Uncomment\ Selection
|
nmenu <silent> &Python.Uncomment\ Selection<Tab>]u
|
||||||
\:call PythonUncommentSelection()<CR>
|
\]u
|
||||||
nmenu &Python.-Sep4- :
|
nmenu &Python.-Sep4- :
|
||||||
nmenu <silent> &Python.Previous\ Class
|
nmenu <silent> &Python.Previous\ Class
|
||||||
\:call PythonDec("class", -1)<CR>
|
\:call PythonDec("class", -1)<CR>
|
||||||
|
|||||||
Reference in New Issue
Block a user