vim

How to run commands against block-wise visual mode selection?

╄→尐↘猪︶ㄣ 提交于 2021-01-29 12:25:36
问题 I have a testing file with the content: var a = f ff fff Then I moved the cursor on the f character in line 1, ctrl + v selected the two f below it (■ means selection). var a = ■ ■f ■ff I want to change the text to this: var a = "f" "ff" "fff" So I executed this command: :normal i" ctrl + v Esc A" But the quotes were added to the whole line. Is it possible to do operations on only block-wise visual selection (not the whole line)? Note that this example was made only for discussing Vim skills.

Use git rebase and I get 'Nothing to do'

半世苍凉 提交于 2021-01-29 03:37:21
问题 Same as title I type "git rebase -i [commit_id]", and I got this: Error detected while processing /Users/My_name/.vimrc: line 1: E117: Unknown function: pathogen#infect E15: Invalid expression: pathogen#infect() Press ENTER or type command to continue after type enter, I success to enter the vim editor. 1 pick f694d12 test 2 3 # Rebase 3dad5af..f694d12 onto 3dad5af (1 command(s)) 4 # 5 # Commands: 6 # p, pick = use commit 7 # r, reword = use commit, but edit the commit message 8 # e, edit =

VIM use system clipboard [closed]

我是研究僧i 提交于 2021-01-29 03:14:03
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . Improve this question So I'm a real noob to VIM and trying now again to get finally to the level of productivity. One big problem I have with this editor is, that it uses a clipboard for itself, which I don't understand why. With VIM I have now 3 clipboards on my system, which is

Qt : How to generate .h and .cpp from a .ui file - Vim and Qt is it practical?

拈花ヽ惹草 提交于 2021-01-28 23:00:13
问题 I have been using Qt for a while in Windows with Visual Studio on Windows using the Qt Addin . For creating forms I would use Qt Designer and when I would save the form which I would get a *.ui file, a *.cpp file and a *.h file. Now on GNU/Linux I plan to use Vim for development. I could create Qt based programs using Vim however I would like to design forms using Qt Designer and integrate the saved *.ui file into my project and use those forms. How can I use the *.ui designed form in my C++

Insert mode default keys in vim

半腔热情 提交于 2021-01-28 16:47:45
问题 The following items are useful to me in editing text, and I was wondering if vim had something for this built out of the box (though I didn't see it on the https://vimhelp.org/index.txt.html#index.txt page), or I had to create mappings for it: Forward-delete a character. This is X in normal mode. Forward-delete all text to the right of the cursor on the line. This is the inverse of ctrl-u . Are either of these mappings available? And if not, are there 'standard' mappings for this that are

Insert mode default keys in vim

♀尐吖头ヾ 提交于 2021-01-28 16:45:34
问题 The following items are useful to me in editing text, and I was wondering if vim had something for this built out of the box (though I didn't see it on the https://vimhelp.org/index.txt.html#index.txt page), or I had to create mappings for it: Forward-delete a character. This is X in normal mode. Forward-delete all text to the right of the cursor on the line. This is the inverse of ctrl-u . Are either of these mappings available? And if not, are there 'standard' mappings for this that are

Insert mode default keys in vim

倖福魔咒の 提交于 2021-01-28 16:43:40
问题 The following items are useful to me in editing text, and I was wondering if vim had something for this built out of the box (though I didn't see it on the https://vimhelp.org/index.txt.html#index.txt page), or I had to create mappings for it: Forward-delete a character. This is X in normal mode. Forward-delete all text to the right of the cursor on the line. This is the inverse of ctrl-u . Are either of these mappings available? And if not, are there 'standard' mappings for this that are

Configure .ccls file for Vim

纵饮孤独 提交于 2021-01-28 03:13:08
问题 I have no idea what I am doing; I decided to use Vim as my only editor, I'm trying to set up autocompletion and syntax checking, so I need to configure a .ccls file in the root of my project (and I don't want to generate a compile_commands.json file so please don't tell me about it). But there is no detailed documentation whatsoever on .ccls because all it does is use compiler flags, which of course I don't know; I have started not too long ago in C++ and I don't know any CMake, I was used to

What is the current situation for using Vim as IDE for Haskell on Archlinux?

那年仲夏 提交于 2021-01-27 19:13:58
问题 My target, if doable, is to have command completion for Haskell in work in Vim, via YouCompleteMe. In this respect, as you can see in the following, I haven't found a consesus yet about how to get it to work. The latest comments on a relevant issue on YouCompleteMe are not that old, therefore I installed haskell-ide-engine from the AUR (the repo on GitHub is here. However, since it was taking so long (it took 110 minutes!) I checked the PKGBUILD file just to discover this: # ... # Supported

.vimrc: line 4: syntax error near unexpected token `(' [duplicate]

南笙酒味 提交于 2021-01-27 12:52:06
问题 This question already has answers here : error while running “source .vimrc” (2 answers) Closed 2 years ago . I'm trying to configured Vim. However when I try to source .vimrc after having edit the file I get the following error: $ source ~/.vimrc -bash: let g:plug_shallow = 0 : command not found -bash: /Users/stevenaguilar/.vimrc: line 4: syntax error near unexpected token (' -bash: /Users/stevenaguilar/.vimrc: line 4: call plug#begin()' I don't understand where is this error coming from. It