Linux vim/vi下backspace(退格键)出现^? 或^H
当次删除操作,可以用【ctrl+w】以词为单位删除。一劳永逸的解决办法需按下面进行,二选一。vim/vi下退格键出现^? (bash下)
方式一:
编辑 .bash_profile 文件,添加一行 stty erase ^? 到最后。执行如下:
vi ~/.bash_profile
stty erase ^?
方式二:
vim/vi下退格键出现^H(csh下)
编辑 .cshrc 文件,添加一行 stty erase ^H 到最后。执行如下:
vi ~/.cshrc
stty erase ^H
p.s.:bash下 检查修改是否成功,输入命令:
stty -a
发现值 erase = ^?; 已经修改成功。
标签: vim vi bash stty backspace
vim 编辑远程文件
vim 编辑远程文件
unstableme.log 是一个存放在172.21.20.104服务器/root目录下的一个文件. 通过从本地的编辑该文件的命令是:
vim scp://root@172.21.20.104//root/unstableme.log
这个时候会提示你输入172.21.20.104服务的密码
(转)http://www.unixcl.com/2008/08/edit-remote-file-using-vi-and-scp-linux.html
vim 打开文件并跳动指定的行数
vim 打开文件并跳动指定的行数
有时我们需要在vim中打开一个文件,然后需要去一个特定的行号,以便检查某些东西或编辑某些东西。 这就是我们如何在vim中打开一个文件,并直接把光标放在我们感兴趣的所需行上。
方法-
使用vim -c 参数
From VIM(1) man page:
-c {command}
{command} will be executed after the first file has been read. {command} is interpreted as an
Ex command. If the {command} contains spaces it must be enclosed in double quotes (this
depends on the shell that is used). Example: Vim "+set si" main.c
热门日志
分类
- Django(4)
- ssdb(1)
- Mac(7)
- C(1)
- memcache(1)
- Python(32)
- Vim(8)
- sed(2)
- ansible(3)
- awk(4)
- shell(3)
- about(1)
- git(9)
- bat(4)
- svn(0)
- docker(1)
- Tornado(1)
- go(2)
- 架构(18)
- Vue(1)
- game(2)
- Html(6)
- Java(8)
- Mysql(37)
- Ajax(2)
- Jsp(1)
- Struts(8)
- Linux(72)
- JavaScript(39)
- Staruml(0)
- Mouth(1)
- Php(102)
- Windows(8)
- Message(48)
- Lua(10)
- Compute(1)
- Redis(7)
- Nginx(12)
- Jquery(1)
- Apache(1)
- cocos2d-x(8)