当使用:redir将命令的输出重定向到变量时,似乎所有的\n都被\r\n替换了。
例如,当运行时
redir => m
silent !echo -e "Hallo\nCiao"
redir END
put =m
然后用^M插入缓冲区末尾的新行,这表示回车(\r)字符。
但是,这似乎只在执行外部命令时发生。如果不使用shell提供的echo命令,而是使用Vim的内部echo命令,即,
redir => m
" Note the missing `!` in front of `echo`
silent echo "Hallo\nCiao"
r
我觉得在Vim保存文件和Karma重新运行我的茉莉花单元测试之间,我遇到了一种竞争状态。下面是四个测试运行的序列,它演示了症状(我截断了错误日志中非常长的路径):
$ karma start karma.conf.js --auto-watch
[... snip a lot of coding and test running ...]
PhantomJS 1.6 (Linux) LOG: 'Running tests at 2013-08-14T08:19:57.252Z'
PhantomJS 1.6 (Linux): Executed 4 of 4 SUCCESS (0.
我正在编辑我的.vimrc,不小心删除了一行,但我不确定是哪一行。以前,如果我使用'one‘配色方案,我的注释将是斜体(现在不是了),并且我的文件没有任何语法突出显示(注释是灰色的,其他所有内容都是白色的)。使用OceanicNext时,我会得到斜体注释,但仍然不能突出显示语法。
很抱歉,我真的很想进入vim,但每次都有东西坏了或者出了问题。
set nocompatible
filetype off
syntax off
" Plugin setup
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin
我当时正在打虚拟高尔夫(顺便说一句,我很容易上瘾),我无法理解http://vimgolf.com/challenges/4d1a34ccfa85f32065000004这个挑战的解决方案之一
目前的挑战是如何转换这一案文:
Make the pairs of lines match up by making each second line same as first:
# Appending text:
The name "Vim" is an acronym for "Vi IMproved"
The name "Vim" is an a
我在vs代码中安装了vim扩展,这里是它的设置
// Vim Extension
"vim.commandLineModeKeyBindingsNonRecursive": [],
"vim.normalModeKeyBindingsNonRecursive": [],
"vim.useCtrlKeys": false,
// this is optional if you want to remap your vim default esc to jj
"vim.insertModeKeyB
在ubuntu 18.04中安装vim后,每次我尝试使用它时,我都会收到以下错误信息:
$ vim
Error detected while processing /usr/share/vim/vimrc:
line 57:
E492: Not an editor command: Source a global configuration file if available
Press ENTER or type command to continue
安装vim后,我没有更改任何配置,所以它完全是纯的。
我的vim实例的详细信息:
$ vim --version
VIM - Vi I