Hi,
Is there a way to disable .swp files creation in vim? or at least create them all in one place so I can find and delete them easily.
I find them especially annoying when I copy the parent directory while editing at the same time. Of course I know that I can use find -exec to find and delete them. But I want a more practical solution...
I don't know if this is possible at all, but still ... no harm in asking.
I'm using Vim to edit fortran files, old and new (.for and .f90). I'm trying to get completion, something alike Visual Studio's, so that when I have several subroutines defined in a file:
subroutine init ( ibc, nquad, ul, ur, xl, xr )
subroutine output ( f, ibc, ...
Let's speak of relative measures. My Vim looks like:
aaaaaaaaaaaaa
bbbbbbbbbbbbb
ccccccccccccc
etc
I would like it to be smaller:
aaaaa
aaaaa
bbbbb
bbbbb
ccccc
ccccc
etc
How can I get it? And how can I manage setting the length of such a block?
...
edit:
I need advice on best way to search with regex in vim and extract any matches that are discovered.
end edit.
I have a csv file that looks something like this:
two fields:
id
and
description
0g98932,"long description sometimes containing numbers like
1234567, or 0000012345 and even BR00012345 but always containing text"
I ...
The Pragmatic Programmer recommends that you should use one
text editor for everything. My chosen
weapon editor is Vim.
So I want to collect all the ways in which Vim (and the Vim
keybindings) can be used and setting up your computer to
make Vim work well. This includes how to embed Vim in your
IDE, web browser, email client, command sh...
Hi all, using grep, vim's grep, or another unix shell command, I'd like to find the functions in a large cpp file that contain a specific word in their body.
In the files that I'm working with the word I'm looking for is on an indented line, the corresponding function header is the first line above the indented line that starts at posi...
I often write something in gvim, then need to copy-paste it into another application.
Is there an easy way to yank the entire file? I usually do something like this, but is there a better way that I'm missing out on?
ggVG"+y
(Go to top, visual-line mode, go to bottom, yank)
...
I'd like to be able to highlight the wrap margin/text width in vim by changing the background color (or maybe just a line?). A lot of IDEs have this. I mocked up what I'm talking about:
Anyone know if this can be done in macvim or gvim?
...
I'm now switching to VIM from TextMate. I found ^+W in insert mode very useful. However, I'd like to delete not only the word before cursor, but the word after or around cursor as well.
I did some googling, but the only thing i can found was that ^+W to delete word BEFORE cursor...
...
How can I replace the first ten characters of a line where those ten characters match a particular pattern with the first ten characters from the line above?
Edit: It wasn't clear if I was asking to replace the first ten characters where the match could appear anywhere within the line, so maybe make a note in your answer if it deals wit...
I have files that look like the following:
>>Start-pattern
some text
some more text
>>Start-pattern
some other text
some more other text
>>Start-pattern
[and so on]
What I would like to have is a mapping that allows me to delete the current "block" of text. Where "block" is defined as all lines ranging from ">>Start-pattern" until be...
I am looking for an equivalent of the ":bufdo" Vim command in Emacs. ":bufdo" takes an argument - another command - and executes the command on all open buffers. I have not yet found a similar feature in Emacs - any suggestions?
Thanks.
...
I want match spaces at the beginning of lines in Vim
PseudoCode of what I want to do
^( )*
I know the following from manual
notation meaning equivalent decimal value(s)
-----------------------------------------------------------------------
<Space> space 32 *space*
...
Is there something equivalent to OmniCppComplete for java in vim ?
I know of eclim but I think it is overkill for such a simple feature.
...
I can't seem to find an answer to this in any of the numerous Vim scripting tutorials online. What I want to do is construct a file name of a script from environment variables and then source it. And I want to do it in Vim.
If I were to do it in a shell I'd do something like this:
source ${HOME}/.vim/myscript_${FOO}.vim
How do I do...
I have this pattern
a,abc_def_eghi
1,234_556
5,567_987_ghi
I want to replace the first _ with a ",". I know %s/old/new/g to replace contents in vim.
Result
a,abc,def_eghi
1,234,556
5,567,987_ghi
Could you suggest some alternatives to go about it
...
I get the old buffers to be opened when I press
Ctrl-O
I want only to browse buffers which I have opened in the current Vim session.
How can you browse fast between current buffers in Vim with Ctrl-O?
...
I want to have the reverse of
Ctrl-O
to be
Shift-Ctrl-O
The original reverse is
Ctrl-i
How can you remap the reverse of Ctrl-O in Vim to be Shift-Ctrl-O?
...
I am looking for some command like:
:b1!g/something_here/
where I supposedly search for a word "something_here" in the buffer "b1". How can I do it?
...
I have the following code in .vimrc
" to eliminate the effect of the line 1560 in taglist.vim
if v:version >= 700
nnoremap <buffer> <silent> t
\
nnoremap <buffer> <silent> <C-t>
\ ...