vim

Is it possible to grep Vim's quickfix?

老子叫甜甜 提交于 2019-12-30 02:08:10
问题 So let's say I use ag.vim to search 'disabled' through files. It returns me some results in quickfix window: 1 first_file.rb|1 col 1| disabled something something 2 second_file.rb|1 col 2| disabled another something Is it possible to pick quickfix results as an input, grep through it and open results in new quickfix? So, if i would enter :quickfix_grep first_file , new quickfix would pop up with only 1 entry: 1 first_file.rb|1 col 1| disabled something something 回答1: Update A vim plugin has

Linux shell (bash) on vi's splitview

别说谁变了你拦得住时间么 提交于 2019-12-30 01:59:19
问题 I've been searching with no results for an integration of bash inside vi, as featured in emacs; the problem is: I have vi open with 2 views, one open with :split command, and I want to use bash through the second view, while I'm editing a file in the first; if I do :sh while editing the second view, the whole session pauses and a bash shell is opened, but I'm not able to edit the file and use the shell at the same time.. I don't want to use !<command> or external programs such as "terminator"

How do I use my .vimrc file in Cygwin?

瘦欲@ 提交于 2019-12-30 00:51:05
问题 I just installed Cygwin on my work machine and would like to use the .vimrc file I use on my Linux box at home. Is that possible, or does it need to have Cygwin-specific settings? Where would I put the .vimrc file? I'm a little unsure of what directory I'm being dropped into at the bash prompt under Cygwin, but I think I'd create a subdirectory called .vim there, right? 回答1: 1) Yes it is possible. It doesnt need any cygwin specific settings, though you can add some windows specific ones. Just

Substitute the n-th occurrence of a word in vim

╄→гoц情女王★ 提交于 2019-12-30 00:37:09
问题 I saw other questions dealing with the finding the n-th occurrence of a word/pattern, but I couldn't find how you would actually substitute the n-th occurrence of a pattern in vim. There's the obvious way of hard coding all the occurrences like :s/.*\(word\).*\(word\).*\(word\).*/.*\1.*\2.*newWord.*/g Is there a better way of doing this? 回答1: You can do this a little more simply by using multiple searches. The empty pattern in the :s/pattern/repl/ command means replace the most recent search

How to execute the contents of a buffer?

跟風遠走 提交于 2019-12-29 19:25:53
问题 I have a vim script I'm developing in my current buffer and I want to execute it. Is there a simple way to do it? After a long search I have only found two related ways, but not exactly what I'm looking for: a) "source" command - but to use it I first need to save the content to file and then "source" it back, which doesn't look simple b) "call" command - but I don't want to call my function, I want to execute the whole file, which defines several functions and has some code outside of

Vim as Visual Studio IDE

╄→гoц情女王★ 提交于 2019-12-29 18:52:53
问题 I have spent lot of time doing research on VIM. I am Windows guy since last 6 yrs and was using VS. Now started working on Linux. I want to make VIM as close as possible to VS. I want features like Project Navigation Files in Different Tabs Search in Project AutoCompletion I have found plugins for the above requirements Project Pligin MiniExplore Taglist OmniComplete I am not able to correctly set vimrc script. When I try to open file from Project it gets open in different tabs.I want to get

Vim as Visual Studio IDE

∥☆過路亽.° 提交于 2019-12-29 18:52:05
问题 I have spent lot of time doing research on VIM. I am Windows guy since last 6 yrs and was using VS. Now started working on Linux. I want to make VIM as close as possible to VS. I want features like Project Navigation Files in Different Tabs Search in Project AutoCompletion I have found plugins for the above requirements Project Pligin MiniExplore Taglist OmniComplete I am not able to correctly set vimrc script. When I try to open file from Project it gets open in different tabs.I want to get

Slow performance on CtrlP , it doesn't work to ignore some folders

穿精又带淫゛_ 提交于 2019-12-29 18:51:32
问题 I tried to ignore the vendor by adding the following setting in .vimrc and I start my ctrlP by typing ff map ff :CtrlP<.><cr> However, it still tried to index all the files under the zeus folder including vendor folder. But after finishing index, I still can NOT search the files under vendor , Why does CtrlP take long time to index ? 129 "add ctrlp.vim setting 130 "" 131 set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*/vendor/*,*/\.git/* 132 let g:ctrlp_custom_ignore = 'tmp$\|\.git$\|\.hg$\|\.svn$\

Vim as Visual Studio IDE

匆匆过客 提交于 2019-12-29 18:51:08
问题 I have spent lot of time doing research on VIM. I am Windows guy since last 6 yrs and was using VS. Now started working on Linux. I want to make VIM as close as possible to VS. I want features like Project Navigation Files in Different Tabs Search in Project AutoCompletion I have found plugins for the above requirements Project Pligin MiniExplore Taglist OmniComplete I am not able to correctly set vimrc script. When I try to open file from Project it gets open in different tabs.I want to get

How to execute selected text as Vim commands

隐身守侯 提交于 2019-12-29 16:27:45
问题 When I am writing documents, I find myself settling on an organization convention appropriate to that document, and I would like Vim to syntax highlight that convention. But making a ftplugin is too "global", I want the syntax coloring to come with the document, so if I send it somewhere without that plugin they can still get the coloring. I found that you can't do it through the modeline because that only accepts options. Right now I am trying to find out if there is a way to select some