About: Restore the last used mode when switching tabpages   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

The following autocommands store the current mode when leaving a tab into a tab-local variable. On entry into the tab, the mode is restored. Place these autocmds in your vimrc or a .vim file in ~/.vim/plugin/ (or $HOME/vimfiles/plugin on Windows).

AttributesValues
rdfs:label
  • Restore the last used mode when switching tabpages
rdfs:comment
  • The following autocommands store the current mode when leaving a tab into a tab-local variable. On entry into the tab, the mode is restored. Place these autocmds in your vimrc or a .vim file in ~/.vim/plugin/ (or $HOME/vimfiles/plugin on Windows).
Version
  • 7(xsd:integer)
dbkwik:vim/property/wikiPageUsesTemplate
Previous
  • 1647(xsd:integer)
Category
  • Tabs
Author
  • Sightless
Subpage
  • /201002
Complexity
  • basic
Created
  • 2008(xsd:integer)
ID
  • 1648(xsd:integer)
NEXT
  • 1649(xsd:integer)
abstract
  • The following autocommands store the current mode when leaving a tab into a tab-local variable. On entry into the tab, the mode is restored. Place these autocmds in your vimrc or a .vim file in ~/.vim/plugin/ (or $HOME/vimfiles/plugin on Windows). augroup tabInsertMode au! au TabLeave * let t:tabInsertMode_lastmode = mode() \ | let t:tabInsertMode_lastcol = col('.') \ | if t:tabInsertMode_lastcol == col('$') \ | let t:tabInsertMode_lastmode = 'A' \ | endif au TabEnter * if exists('t:tabInsertMode_lastmode') \ | if t:tabInsertMode_lastmode == 'A' \ | if mode() == 'i' | call feedkeys("\l") \ | else | call feedkeys("A") | endif \ | elseif t:tabInsertMode_lastmode == 'i' \ | if mode() != 'i' | call feedkeys("i") | endif \ | else \ | if mode() == 'i' | call feedkeys("\") | endif \ | endif \ | endif augroup END
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software