conomode.vim


Ⅰ. 插件描述

Vi-style editing for the command line

Ⅱ. 基本信息

创建日期:  2008-10-02
使用用户:  1
Github星:  1
插件作者:  Andy Wokula

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin '/conomode-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle '/conomode-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug '/conomode-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/vim-scripts/conomode.vim

Ⅳ. 文档说明

Continued here: https://github.com/Houl/conomode-vim (2017 Aug 06)

Implements a kind of Normal mode ( "Cmdline-Normal mode" ) on top of the Command line.  Purpose is similar to the cmdline-window (q:), but navigation and editing can be done in-place.  Of course the cmdline-window is much more powerful.

Conomode does not replace Vim's native emacs-style command line editing, it just adds one key: CTRL-O (see below).

  • enter with c_<C-O>   (press CTRL-O while in Command-line mode)
  • mode indicator is a colon ":", moved along with the cursor, hiding the char under it
  • quit to Cmdline-mode with I, i, a, A, : or any unmapped key (which then executes or inserts itself), or wait 60 seconds.
  • quit to Normal mode with Esc

Features So Far:

  • Motions: h l w b e W B E 0 ^ $ f{char} F{char} t{char} T{char} ; , %    also in Operator pending mode
  • Operators: d y c    these write to the unnamed register; c prompts for input()
  • Shortcuts: yy dd D x X s C    yy -> y_, dd -> d_, D -> d$, x -> dl, X -> dh, s -> cl, C -> c$
  • Simple Changes: ~ r{char}
  • Putting: P p     put the unnamed register
  • Repeating: .     repeatable commands: d r c ~ o   also: I i a A
  • Macros: q @      q starts[/stops] recording, @ executes, no register involved
  • Mode Switching:  I i a A - back to Cmdline (with positioned cursor),  <Esc> - back to Normal mode, <CR> - execute Cmdline, : - back to Cmdline (remove all text)
  • Insert: o        input() version of i (accepts a count and is recordable)
  • Undo: u U        redo with "U" (to keep c_CTRL-R working); undo information survives mode switching (!); undo is yet unlimited
  • Count: can be given for most commands
  • Misc: <C-L> - redraw the Cmdline

Notes:

  • the mode indicator makes UTF-8 characters look garbled - it's only a display problem; press Ctrl-L to redraw the Cmdline; I'd rather not use conomode with UTF-8, sorry ...

Feedback is welcome (bugs, usage improvements, does it feel like vi?, etc.)

Have fun!

2012 Apr 14

添加新评论