Tagged Questions

Vim stands for Vi IMproved. Vim is a configurable text editor. It is an improved version of the vi editor. From the Vim website: Vim is a highly configurable text editor built to enable efficient text editing. It is an improved version of the vi editor distributed with most UNIX systems. ...

learn more… | top users | synonyms

0
votes
2answers
33 views

Vim: Shortcut to move to beginning of next line / end of previous line?

Is there any shortcut in vim to move to the beginning of the next line or the end of the previous line? Is there any way to do it without having to use $ or ^? Also, is there any way to make it so ...
0
votes
1answer
21 views

Use argdo with search pattern to delete line while suppressing errors and requiring confirmation in Vim

I use gVim 7.3.46 on Win 7. It is pretty straightforward to use argdo to search args files for a pattern and replace it while suppressing errors and requiring confirmation. :argdo ...
0
votes
2answers
52 views

vim is slow, even on console without X running

I'm using Arch Linux and I installed vim from the official repos. It runs OK, but when I have syntax and cursor highlight turned on, it is extremely slow. I already trying running only the 'core' ...
1
vote
3answers
43 views

Macvim lags while Vim on terminal is buttery smooth

I am running OS X Lion 10.7.3 and Macvim runs significantly slower than vim on the terminal for me. All movement commands in Macvim are much slower. Moving up and down in visual mode is equally as ...
0
votes
0answers
15 views

Change the color for a keyword in Vim for ALL filetypes

I'm using &showbreak=repeat(' ', 5) to add indentation to wordwrapped lines. What I WANT to do is add a bright red >>>> instead. How would I change all >>>> occurrences ...
0
votes
2answers
25 views

vim: last normal mode command and moves

in vim, with ., I can repeat the last normal mode command, example dd. delete two times a line. But, if I press 5j. the cursor don't move 10 lines down.
1
vote
1answer
29 views

Vim: Close and return to last tab, repeat

I find myself in this situation very often: Open gVim with NERDTree from current working directory. Open a file from NERDTree using <S-T> so it grabs a new tab. :tabprevious to return to ...
3
votes
0answers
32 views

How to show current mode in status-line in tmux?

In vim: :set showcmd tells me what key I've typed(such as f). In tmux: after typing Ctrl-b, I stop to think about the next key I need. Sometimes I forgot I've typed Ctrl-b, so I type it again, it ...
1
vote
1answer
33 views

Find/replace underscored words to camelCase words using regex?

I have a ton of text files that are tagged with underscore-connected words like @some_text, but I would like to convert those to tags in camel case, like @someText. How can I use regex (either in vim ...
2
votes
1answer
40 views

How to close other windows in tmux?

I write some functions in .bashrc to make tmux easy to use: #!/bin/bash # .bashrc # vim tmux #----- -------------------- tabc() { tmux kill-window; } tabe() { tmux new-window; } tabf() ...
0
votes
1answer
21 views

How do I modify a literate haskell script to contain unicode characters?

I would like to modify a .lhs file currently written in plain text. For example, -> would be replaced by → in the .lhs file. I am aware that for display purposes, many text editors can replace these ...
0
votes
1answer
32 views

Passing the an argument to Windows shortcut

I was successful in opening vim via shortcut in Windows. It is simple as creating a target with C:\cygwin\bin\mintty.exe /bin/vim Now when I open a file with this shortcut, it seems as though ...
1
vote
1answer
44 views

vim: Vim: Caught deadly signal SEGV on multiple files

Fairly regularly (certainly more regularly than not) I run into an issue when editing more than one file in vim (on OSX) - I'll open a set of files with vim *.txt Edit a file, save it, close the ...
0
votes
2answers
36 views

vim: remove quickfix highlights

I just learned about :grep in vim which is great for searching in multiple files. What troubles me is that when I have found the line I'm after, I'd like to remove all quickfix hightlights. And I ...
0
votes
1answer
23 views

Converting between a vim replace and a perl pie replace

So I have a file test.txt, that contains, home -> range If I edit the file in vim and run the command %s/^\(.*\)->\(.*\)$/\2 ::= \1 ;/g it converts the file to range ::= home ; which is ...
0
votes
2answers
39 views

Get Path Of Existing Directory or File, Paste at Cursor Position

I am using vim to edit config files on newly-built linux servers. On these boxes I have a default vim setup (RHEL 6.2). While editing these files, I'd like to avoid fat-fingering directory & ...
0
votes
1answer
40 views

Vim plugins not working in OSX 10.7

I had downloaded snipmate from http://www.vim.org/scripts/script.php?script_id=2540... I extracted the zip file and copied it to folder /usr/share/vim/vim73/ Before this plugin, i tried to install ...
2
votes
1answer
43 views

looking for an alternative to refile in orgmode for emacs

In emacs/orgmode there is something called refile. you select text, hit refile and you get a list of your outline headlines, select one and your text goes there. Can I achieve something like this in ...
6
votes
7answers
162 views

Open a Console Based Editor with limited access

I have a script that will be executed through SSH. My SSH server is configured to always trigger this script, so the user doesnt have access to actual machine. One of the features of this script is ...
1
vote
1answer
48 views

Shell scripts in windows

I've been using the terminal in Ubuntu and Debian for a while and use shell scripts, commands like find, grep etc.. and the vim editor. What is the best way to use such commands/software under ...
0
votes
1answer
24 views

how to disable loadview in vimdiff

I'm trying to disable the feature in vim that remembers where I was, when I'm using vimdiff. the reason for this is simple I don't want to miss a change that has scrolled out of view. I found a lot ...
0
votes
1answer
25 views

Visually select a block and replace every occurrence of block

I'm refactoring some code and I have several occurrences of the same block of code. I want to grab the block (probably in visual mode) and then replace every occurrence of it with a method call that I ...
1
vote
2answers
24 views

Vim Overlength highlighting for certain filetypes only

I'm using the following in my .vimrc to highlight lines that over 80 characters long: highlight OverLength ctermbg=red ctermfg=white guibg=#592929 match OverLength /\%81v.\+/ This affects all of my ...
1
vote
0answers
40 views

Delete one whitespace to the left

Consider this code: foo = (int)someVariable - 42; bar = someFunction('someArgument') + 42; By placing the cursor on the leading character of someVariable and someFunction we can experiment with dw, ...
0
votes
1answer
61 views

Changing the highlighted text background color in VIM on Mac OS X

I have a color scheme that I really like for the terminal on my Linux box. I have edited Terminal.app's color scheme on my Mac to be identical to on my Linux box, and for the most part I am happy. I ...
2
votes
1answer
94 views

VIM: How to configure Solarized colorscheme in Konsole

I am trying to configure Solarized for use in VIM in Konsole (KDE terminal). This is the result that I get: Note that Solarized looks fine in GVIM on the same machine: I suspect that it is ...
1
vote
2answers
46 views

VIM: Tab as omnicomplete, but not at beginning of line

I have configured Tab as Omnicompetion in VIM 7.3: inoremap <Tab> <C-n> This is convenient, but I would really like to have regular tab back at the beginning of a line! Is there any way ...
0
votes
0answers
28 views

How do I use installed Vim in Git Bash instead of the one that came with Git?

I've installed Vim and Git to C:\Program Files (x86)\(vim|git) respectively. When I run Vim from Git Bash, it runs the internal version of Vim that came with the Git installer. Is there a way to ...
2
votes
1answer
25 views

How do I save the files lists in vim?

I've opened many files in vim, is there a command to save the full paths of opened files into a separate file so that next time I can resume with vim -p files.txt?
2
votes
1answer
84 views

Can you hide the tmux status bar when starting a program like vim?

Some programs, like vim, look much better without the tmux status bar at the bottom. I have already set up a key that toggles the visibility of the status bar, but it would be even awesomer if the ...
0
votes
1answer
54 views

Vim doesn't load symlinked .vimrc

I've got a symlinked .vimrc: simont@charmander ~/repositories/config-files [master *] ± $ ls -l ~/.vimrc lrwxr-xr-x 1 simont admin 6 9 May 17:14 /Users/simont/.vimrc -> .vimrc However, vim ...
1
vote
1answer
69 views

vim “gq}” command to re-wrap paragraph, and LaTeX

How can I make this command not wrap things like \item? For example: \begin{enumerate} \item this might be a long paragraph that spans multiple lines \item blah \end{enumerate} if I run "gq}" ...
0
votes
2answers
41 views

How to search for and sort all lines found using vim?

I have some c++ includes that I want to sort: #ifndef t #define t #include <b> #include <a> #include <c> #endif I can shift-v to highlight the #include lines and then do :sort ...
0
votes
1answer
30 views

Read from stdin to new, named, file in vim

I'd like to start vim on a non existing file, named f, with the content c. Both f and c are arbitrary and I'd like to not have to put anything in the vim config to fill new buffers with c. Basically, ...
0
votes
2answers
72 views

Install vim with clipboard support using Macports in OS X 10.7.3

I know that one can pass ./configure some flags to install vim with clipboard support. I want to do this via Macports. In apt, there was a way to download a package's source without first installing ...
0
votes
1answer
20 views

Xauthority hosed vim's ability to connect to Xserver

I recently tried to move .Xauthority away from ~/.Xauthority in a futile attempt to clean up my home directory. Or, rather, I set $XAUTHORITY to somewhere else, changed startx to startx -- -auth ...
2
votes
1answer
50 views

Join lines between a certain text pattern in Vim

I have a text file which looks like this: A. text text text A. more text more text A. more text I want to join all lines between the "markers" A. so that it looks like: A.texttexttext A.more ...
2
votes
1answer
35 views

When editing an existing file with VIM: will it replace or change that file?

I've read that most editors will replace the file when you actually want to save changes to that file How to execute a command whenever a file changes?. So how does VIM behave?
1
vote
1answer
29 views

Fully reinstall / remove VIM

I recently ran a script which configures VIM and installs plugins needed for development. I installed it like this: $ git clone https://github.com/sontek/dotfiles.git $ cd dotfiles $ ./install.sh vim ...
2
votes
2answers
74 views

Vim - dynamic list of open buffers in a window

I've investigated a few ways to maintain a list of open buffers in Vim, and some of them are very good, but none of them seem to behave the way I'd like. It's very possible that nothing like what I ...
0
votes
2answers
38 views

Copying/Pasting in VIM without overwriting register

Haven't been able to figure this out... So I usually like to select a word (say, albatross) and copy it to a register using v i w y, which–as I understand it–copies it into the * register. Then I ...
0
votes
2answers
44 views

modifying vim paragraph jumping commands to whitespace-containing lines or code blocks

1) With the { and } commands in vim I can jump to the previous or next completely blank line (or beginning or end of file). How do I modify these commands to jump to the previous or next line being ...
1
vote
2answers
100 views

How do I set the default window size in vim?

When I right click on a file and open it in Vim, the default window size is too small. How can I change the settings so that the default window size is bigger? I'm running Vim 7.3.46 in Windows 7.
0
votes
2answers
60 views

Add arrows in vim

Let's say I have this code : CommitEvent 4 FooEvent 3 BarEvent 5 NoneEvent 12 And many other lines like this. Using vim, I want to change it to : CommitEvent => 4, FooEvent => 3, BarEvent ...
1
vote
1answer
93 views

urxvt vim transparent colorscheme

I have urxvt running in real transparency mode using xcompmgr. Everything looks great but I would like my vim colorscheme to respect the transparency setting. Is this possible?
1
vote
1answer
26 views

How do I set the cursor to stop when it hits the end of a line in Vim?

(Disclamer: I'm new to Vim.) I've mistakenly managed to enable cursor movements to travel anywhere on the screen, i.e. beyond end of lines. This makes it very tedious to spot redundant whitespaces, ...
0
votes
4answers
66 views

VIM: Where are these non-default settings store if not in my .vimrc file?

So when I press :set I see a bunch of settings that are not on my ~/.vimrc file. (My guess is they're settings I've set years ago and don't remember). So I do :version and get a path $VIM/vimrc, ...
2
votes
1answer
46 views

can I make zsh filename completion work like Vim?

I use setopt menu_complete so that I can hit TAB repeatedly to get different filename completions in zsh. However, I would also like to be able to type: ls ~/*.txt<TAB> and then use TAB to ...
2
votes
2answers
51 views

Search in Vim's undo history

I have a "weird" usage pattern in vim that I often use - or have to use, depending on how you view it. What normally happens is this: I enter some text, do some editing, then remove a bit of text ...
1
vote
2answers
75 views

Errors when using vim over ssh -t in Cygwin

I'd like to ssh to a remote server and vim a file. I tried ssh -t user@host "vim x" which gave me errors: Error detected while processing /home/michael/.vimrc: line 58: E538: No mouse support: ...

1 2 3 4 5 25