在bash / CLI可视选择 [英] visual selection in bash / cli

查看:113
本文介绍了在bash / CLI可视选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法,使庆典使用视觉选择对于文本替换

标准文本输入约定不工作:


  1. 如果您preSS Shift +向左键,人物向左,应选择视觉

  2. 如果您preSS按Ctrl +左箭头,光标应该移动到previous单词的开头

  3. 如果您preSS SHIFT + CTRL +左箭头,字的左边应该选择可视化

  4. 如果您直观地选择一些文本,然后$​​ P $ PSS任意键,文本应与关键的文本替换你preSS

vi模式(设置-o六)可视选择约定不工作:


  1. 如果您进入正常模式,preSS'V'进入视觉选择,然后preSS'H',它应该在视觉上选择字符向左

  2. 如果您进入正常模式,preSS'V'进入视觉选择,然后preSS'B',它应该在视觉上选字向左

  3. 如果您直观地选择一些文本,然后$​​ P $ PSS'R',就应该删除的文字,让你打字替换


解决方案

家伙没有为它的zsh:


  

我做了VI视觉模式!ZSH。模拟在cmd线!VIM的视觉模式V。 http://ur1.ca/izng


它的真棒!

Is there a way to make bash use visual selections for text replacement?

Standard text input conventions don't work:

  1. If you press Shift+Left Arrow, the character to the left should be visually selected
  2. If you press Ctrl+Left Arrow, the cursor should move to the beginning of the previous word
  3. If you press Shift+Ctrl+Left Arrow, the word to the left should be visually selected
  4. If you visually select some text then press any key, the text should be replaced with the text of the key you press

Vi mode (set -o vi) visual selection conventions don't work:

  1. If you enter normal mode, press 'v' to enter visual selection, then press 'h', it should visually select the character to the left
  2. If you enter normal mode, press 'v' to enter visual selection, then press 'B', it should visually select the word to the left
  3. If you visually select some text and then press 'R', it should erase the text and leave you typing the replacement

解决方案

this guy did it for zsh:

I've made a VI VISUAL Mode for !ZSH. Emulates !VIM 's visual mode "v" in the cmd-line. http://ur1.ca/izng

it's awesome!

这篇关于在bash / CLI可视选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆