linux反序排列文件,关于linux vim命令 总结

第 11 页 反序排列的方法:

反序排列的方法:

首先到要反序的第一行,用mt标注当前位置,然后到要替换的反序的最后一行,输入命令:'t+1,.g/^/m 't 可以用.范围(global默认是%)然后编辑反射这样就可以挑出想要的内容,还可以不确定范围用0代替 't将对整个文件进行反序

挑选文本的方法:

:map :.g/^/co 'p :normal 需要首先用mp定义p的位置

6.配色方案:

命令:

:syntax on       打开语法高亮

:syntax clear       清楚当前的语法高亮

:syntax off       关闭语法高亮

:syntax manual       将高亮模式设置为手动

:set syntax=ON       设置以上选项后,用这个命令开启语法高亮

:filetype on       打开文件类型检测

:set filetype       设置当前文件类型

:plugin on       使用文件类型插件

:indent on       打开文件类型自动缩进

:set background       手动配置背景色(VIM一般会自动推断终端的背景色) 此命令必须放置在 :syntax enable 前 否则不起作用

:syntax reset       vim重新设置默认颜色

:runtime syntax/colortest.vim       查看配色方案的实例

:colorscheme       选择配色方案

:colorscheme mine       一直使用自己的配色方案

CTRL-L       重绘VIM的屏幕

配色方案文件中的关键字及作用:

配色方案的路径:$VIMRUNTIME/colors   ~/.vim/colors

term attributes in a B&W terminal

cterm attributes in a color terminal

ctermfg foreground color in a color terminal

ctermbg background color in a color terminal

gui attributes in the GUI

guifg foreground color in the GUI

guibg background color in the GUI

可以这样设置:highlight Comment ctermfg=green guifg=green

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值