Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7eb7c24

Browse files
committed
use normal!
following Steve Losh's "Writing Vim Plugins" advice normal! ensures that the original vim mappings are used, and ignores any remapping of normal commands that a user might make locally
1 parent 81ce20c commit 7eb7c24

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

ftplugin/python/ipy.vim

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def get_doc_buffer(level=0):
260260
vim.command('resize %d'%len(b))
261261
#vim.command('pcl')
262262
#vim.command('pedit doc')
263-
#vim.command('normal ') # go to previous window
263+
#vim.command('normal! ') # go to previous window
264264
if level == 0:
265265
# use the ReST formatting that ships with stock vim
266266
vim.command('setlocal syntax=rst')
@@ -388,9 +388,9 @@ def update_subchannel_msgs(debug=False, force=False):
388388
if b[-1] != '':
389389
b.append([''])
390390
if update_occured or force:
391-
vim.command('normal G') # go to the end of the file
391+
vim.command('normal! G') # go to the end of the file
392392
if not startedin_vimipython:
393-
vim.command('normal p') # go back to where you were
393+
vim.command('normal! p') # go back to where you were
394394
return update_occured
395395

396396
def get_child_msg(msg_id):
@@ -473,9 +473,9 @@ def run_these_lines():
473473
#vim.command("\"*yy")
474474
#send("'%paste')")
475475
#reselect the previously highlighted block
476-
vim.command("normal gv")
476+
vim.command("normal! gv")
477477
if not reselect:
478-
vim.command("normal ")
478+
vim.command("normal! ")
479479

480480
#vim lines start with 1
481481
#print "lines %d-%d sent to ipython"% (r.start+1,r.end+1)

0 commit comments

Comments
 (0)