我试图在Linux服务器上编辑一个my.cnf文件,并使用vim进行编辑。做完编辑后,我无法逃脱。我尝试过使用以下方法退出:
q
!q
wq
!wq
这些方法都没有奏效。当我离开时,它给了我一句台词:
shell return 127
Press ENTER or type command to continue
如果我做了上述任何一个建议,我会回到维姆。另外,ctrl也不起作用。请帮帮忙。我要用维姆结束这一切。
我想使用Vim来查看history的结果(而不是在shell中)。我认为history | vim可以工作(使用history的结果作为vim的输入),但它返回如下内容:
$history | vim
Vim: Warning: Input is not from a terminal
Vim: Error reading input, exiting...
Vim: Finished.
有人能解释这个吗?
我一直在跟踪;https://warlord0blog.wordpress.com/2018/03/27/access-dfs-shares-from-linux/
通过这个,我可以手动挂载cifs共享,但是当我试图通过kerberos在fstab中挂载它时;
//windows/share/filepath /home/Drive cifs user,uid=me,gid=metoo,vers=3.0,rw,sec=krb5 0 0
我得到了
➜ ~ sudo mount -a
mount error(2): No such file or directory
Refer
我是vim的新手,我正在尝试让代码完成工作。我使用的是clang_complete和vim-cmake-project。我通过键入:CMake projectdirectory来打开我的项目,它将打开我的项目,我可以选择要打开的文件,但当我尝试触发clang_complete时,它会说,-- User defined completion (^U^N^P) Pattern not found. I and this to my .vimrc file:
let g:clang_complete_auto = 1
let g:clang_use_library = 1
let g:clang_d
我在Vim中有两个拆分窗口(左一个是my_file.txt,右边一个是终端),在".vimrc“中的rightb vert term帮助下。为了关闭这两个窗口,我通常在终端中使用exit,然后在my_file.txt中使用:q。但是,如果我按其他顺序关闭窗口(首先是:q文件,然后是exit,然后是终端)进程"Vim“仍然有效,并且打开了一个带有my_file的窗口。因此,我需要再次使用:q关闭my_file窗口。你能猜出原因吗?
我对vim脚本进行了如下尝试,以检查它是否已安装以及其版本是否最近(8+):
# Check if we have vim version 8.1+ installed
VIM_PATH=$(which vim)
VIM_VERSION=$(vim --version |grep '8.[123]')
if [ -z "$VIM_PATH" || -z "$VIM_VERSION" ]
then
...
fi
上面的脚本是否有效?有什么更好的方法来获取版本并检查是否
我用的是吉特。我做了一个正常的合并,但它一直在问:
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
即使我写了什么,我也不能离开这里。我找不到医生解释这件事。我该怎么办?
vim手册页包含两个类似的-r类型命令。下面我将给出更多的背景知识,这个问题实际上是如何调用第一种类型的-r来列出交换文件,但是要避免第二个调用恢复的-r
-r List swap files, with information about using them for re‐
covery.
-r {file} Recovery mode. The swap file is used to recover a crashed
editing session. The swap file i
我用Vim做编辑。
我希望在用crontab -e编辑Crontab时有语法着色。我跟着这回答。在设置变量EDITOR=vim并导出它之后,crontab -e现在显示了我想要的语法颜色。我正在编辑Crontab作为我自己的用户,而不是使用Sudo。
但是,当关闭Crontab时,这会导致错误:
/tmp/crontab.019kNj" 4L, 278C written
E886: Can't rename viminfo file to /home/me/.viminfo!
Press ENTER or type command to continue
这种情况在保存更改时和
当我做一个交互式的rebase时,例如
git rebase -i HEAD~3
rebase交互式编辑器(在我的例子中是vim)打开,让我编辑rebase的提交
pick c843ea2 Set Vim column limit to 80 (OS X)
pick fc32eac Add Bash alias for `pbcopy` (OS X)
....
如果我现在决定中止rebase并使用:q退出vim,那么rebase无论如何都会启动。我在windows上使用的是git版本的1.9.0.msysgit.0。
当然,我可以删除所有的pick行,但如果我重新设置一个更长的历史基址,可能会
我只是尝试在DigitalOcean上设置一个用于教育目的的WHM/C面板。
我找到了这个链接来保护WHM -
将运行此命令
vi /etc/ssh/sshd_config
我得到下面的错误(我以前试过这个命令,但我没有保存就断开了连接)
E325: ATTENTION
Found a swap file by the name "/etc/ssh/.sshd_config.swp"
owned by: root dated: Tue Oct 16 13:18:49 2018
file name: /etc/ssh/sshd_config
我已经在linux下用以下命令将我的caps lock key映射到ctrl:
`setxkbmap -option ctrl:nocaps` I really like this mapping and want to keep it, but I also would like to map the caps lock key to Escape when I am inside vim. But when I try to map it with `:map <C> <Esc>` or similar it does not seem to work, p
当我用Vim打开我的Capfile时,显示了以下错误:
"Capfile" 36L, 1302C
Error detected while processing BufRead Autocommands for "Capfile" :
E20: Mark not set
为什么会这样?
这是我的Capfile:
# Load DSL and Setup Up Stages
require 'capistrano/setup'
# Includes default deployment tasks
require 'capistrano/