vim (Vi IMproved) is a text editor supporting different editing modes.
3
votes
3answers
54 views
vi: backspace in insert mode not erasing characters
I am new to vi, actually I have started learning vi from today and I have got stuck at the behavior of the backspace key. Actually when I fired up vi on my Ubuntu 12.04 for the first time my backspace ...
1
vote
1answer
80 views
Launch R code from within vim-r-plugin as separate window instead of inside tmux/screen?
I use the vim-r-plugin to write R code in vim. It is a nice plugin and I love that the plugin lets me run code directly from within vim.
However, the R prompt is opened in a console which is ...
4
votes
1answer
108 views
Different vim colorscheme depending on mode
I'm often doing the same mistake in vim:
I forget whether I'm in insert or command mode, then I type in, I get random commands or I modify/delete code, and I have to undo. I do this mistake really ...
1
vote
2answers
90 views
Saving files on lost focus in Vim
I have been trying to setup the shell version of vim to save any changed files when the shell window loses focus.
Following these instructions does not work.
Even though I am using OS X, I figure ...
2
votes
3answers
56 views
Open multiple files in Vim with a filelist
I have a file 'filelist' that contains the following lines:
text1.txt
text2.txt
text3.txt
I am looking for a command line invocation that opens the 3 files in vim. I tried the following:
$ cat ...
2
votes
1answer
29 views
SED Showing CRLF While Vim Not Showing
Why sed l\;q shows a CRLF while opening the file in Vim with :set list doesn't show any CRLF
2
votes
2answers
98 views
How to consistently start Vim's command line to make a mapping work in any mode?
I try to normalize access to Vim's command line mode from any other mode in order to simplify my actual mappings. For example to make the <f6> key work from anywhere I define the following ...
0
votes
3answers
52 views
Text editor with indented word wrapping
I've been using Notepad++ in windows for a while and it has a cool feature for word wrapping so that the wrapped text is indented. That is the start of the sentence starts at column 1, but wrapped ...
2
votes
1answer
918 views
How do I get the solarized colour scheme working with gnome-terminal, tmux and vim?
There's a lot of questions around this, but it's because there are so many variables. I had to piece together instructions from many sites before I got this working.
First, I could not easily set up ...
3
votes
1answer
46 views
Vim syntax highlight length-delimited fields
I'm trying to write a vim syntax file for SVN dump files. The part I can't figure out is the section like this:
Fooprop: Val1
Text-content-length: 20
Barprop: Val2
...
3
votes
3answers
98 views
vi / vim - how to automatically strip trailing spaces on save?
Is there a .vimrc setting to automatically remove trailing whitespace when saving a file?
Ideally (to be safe) I would like to only have this functionality for certain files, e.g. *.rb
3
votes
1answer
48 views
Expanding functionality of case switching commands in Vim
In my current work of refactoring a fairly large codebase, I find myself wanting to replace apostrophes and quotes with each other from time to time.
Up until now I've been applying s/"/'/g for ...
1
vote
2answers
372 views
vim how to configure backspace and delete key's both as normal
How to configure following keys in vim?
Backspace key to delete a character backwards.
Delete key to delete a character forwards.
After reading some posts, I got to know that only one of those can ...
4
votes
1answer
863 views
vim auto indenting even after setting noai option
I am using vim 7.2 from putty terminal.
Even if I run set noai it seems vim still trying to indent code.
I am copying my code from Notepad++ to vim.
following is from Notepad++
and following what I ...
0
votes
1answer
52 views
vi / vim - extra indents when pasting text? [duplicate]
I can copy characters in other apps such as browsers with ctrlc.
I can then press i to enter insert mode in vim and press shiftctrlv to paste the text in.
The problem is that each line gets indented ...
7
votes
4answers
562 views
Preserve modified time stamp after edit
For files within a specific folder, I would like vim to never touch "modified"
timestamp at all.
The background is that I use Bloxsom for blogging, which uses plain text
files in ~/bloxsom as source ...
4
votes
1answer
255 views
vim.googlecode.com SSL certificate change
I am building vim from source and keep having to update the SSL hostfingerprints of my ~/.hgrc file. It's getting a little silly and large – see below. The pattern is the same: run update, ...
-1
votes
1answer
45 views
Can't uninstall vim [closed]
I've got a problem with vim deinstallation. I've done sudo apt-get remove on vim, vim-common, vim-tiny and actually anything starting with 'vim' in the package list, but still can run vim from command ...
3
votes
2answers
671 views
No syntax coloring in vim for me, but ok for my students
My students get syntax coloring in vim, but I don't!
Even when I "syntax on" as a command syntax on or put it in my .vimrc and/or .exrc.
The terminal is xterm.
I am missing something in vim or is ...
1
vote
1answer
49 views
Is there a file menu plugin for vim (not gVim) that creates a text-based GUI menu system?
I'm curious to see if there are any plugins that create a menu inside vim (not gVim). Perhaps something simple like a menu bar at the top, with drop down menus that are drawn with text.
EDIT: The ...
3
votes
1answer
38 views
Can I access X11's clipboard from tty1-6?
Sometimes, when I'm running on battery and don't need a window manager, I'll log into tty1, fire up fbterm and Vim and work. Later, if I need the window manager, I'll use the log in GUI but switch ...
3
votes
2answers
54 views
Vim - loop through files in cope
how can I lop through buffers in quickfix list :copen and make some actions with it.
Or any alternative way to put those files to args list and I can use argsdo.
2
votes
1answer
25 views
How do I save all vim buffers on tmux window change?
Is it possible to hook up vim save all command on tmux window change?
I know that gui vim has option to save on focus lost. I'd like to have similar behavior in console.
5
votes
1answer
3k views
Switch VI to use backspace key instead of Control+H for backspace?
I'm on Solaris 10 and by default vi version SVR4.0, Solaris 2.5.0 is installed.
The system was set up so that when I ssh to it Control+H does backspace, and backspace outputs ^?
I added stty erase ...
2
votes
1answer
59 views
File no longer available when trying to edit in vim via <()
When working with mercurial, I frequently do things like
vim <(hg cat -r 42 somefile)
However, if I try this with a file larger than several hundred lines, I get a Read Error in vim, and only ...
2
votes
1answer
130 views
Beep when typing backslash in cvim normal mode
I installed the cvim plugin for vim.
Almost all the cvim commands start with '\'.
But I when enter this character in normal mode, all I hear is a beep. Nothing happens. What might be causing this ...
1
vote
1answer
22 views
Set auto completion for a new filetype
I have a file, which contains lines of function name, now I want to use them for code auto completion, and only for file names end with .XXX.
How should I do it, is it possible to work with ctags or ...
1
vote
1answer
48 views
Why does Vim only activate my highlight configuration after I source my .vimrc manually?
I was cleaning up my vimrc today, splitting it into separate files to make it easier to maintain. On completion of these changes, all my configuration, mappings and plugins appear to be working, ...
3
votes
2answers
45 views
vim shortcut to open a file under cursor in an already opened window
In vim you can open a file under the cursor by using the gf command.
One can also easily open that file in a new split window by hitting <c-w> f. This is a really nice and time saving feature. ...
3
votes
4answers
115 views
Vim: copy, then paste more than once
I use the highlight mode in vim to copy a few characters. I then want to paste more than once. My current technique does not work well.
Sample text: Linux Solaris Irix HP-UX
Suppose I want to copy ...
0
votes
2answers
41 views
Calendar.vim E492: Not an editor command: Calendar
I am trying to install the calendar.vim plugin on mac osx snow leopard running gvim. I have pathogen.vim installed, so I followed the instructions on github to install calendar.vim from the terminal:
...
2
votes
1answer
81 views
bash script - supervisor program
I have to write a shell-script that have to do the following tasks:
-in every 5 seconds it saves:
-how many users are using joe and/or vi;
-if ...
3
votes
2answers
124 views
Change colors in console/virtual terminal
Is there a way to alter all the available colors in console / virtual terminal?
By console, I mean what you get after pressing CTRL + ALT + F1 and not anything like xterm or urxvt. So, I guess that ...
1
vote
1answer
28 views
Wildmenu “closes” when opening a single item directory
TLDR;
I want to open wildmenu with <Tab> and keep it open until I open a file.
Suppose that I have the following directory structure:
./file1
./file2
./dir1/file3
./dir1/dir2/file4
...
1
vote
2answers
91 views
How can I set “vi” as my default editor in UNIX?
I believe I can do something like export EDITOR=vi, but I'm not sure what exactly to enter, and where.
How can I set "vi" as my default editor?
2
votes
1answer
163 views
Vi: On startup, highlight tags and display tags in a preview window
I am using vi as a note-taking and outlining tool. I am constructing the "tags" file by myself. What I would like to do is that when I open my notes or
outline file, vi reads the tags present in this ...
1
vote
1answer
39 views
VIM: Display Hex Code Inline
I would like to have hex codes been displayed inline, no matter what filetype is activated in the current session.
So far I've found something existent and suitable for my needs: ...
2
votes
1answer
149 views
vim auto complete custom list
I had these two questions about this function
" how do I load a file into a list here?
" set some variable
func! CustomComplete()
" and then read the variable here so that b:list = a \n split ...
3
votes
1answer
66 views
vi[m] read range of lines from another file
On Linux, editing file_B in vim I want to add line 10-25 from file_A. Example: One has a whole set of HTML-Documents with quite the same header and yes, one could create a template and start from ...
2
votes
1answer
103 views
How to change Vim's command type mode programmatically?
Is there a simple way to switch from one command type mode to another without loosing the current command line?
In my ~/.vimrc file I remap the <space> and <c-space> character, coming ...
0
votes
1answer
23 views
Why is vim offering me spelling suggestions instead of using the completefunc?
I am trying to set up vim for writing email. I have a plugin to provide autocompletion of email addresses (notmuch abook ). If I do :set completefunc it tells me it is CompleteAddressBook as ...
0
votes
1answer
33 views
How can I hook functionality to the “go to line”-command in Vim?
I just got the idea that I wanted to make it so that Vim centered around a line when I jump to it.
Is there a way to make zz be executed automatically after I have called the colon command followed ...
1
vote
2answers
51 views
How do I set vim as the default editor when I sudo?
I'm working on a CentOS 5.9 machine, and I simply want to type
sudo vi somefile
and have my trusty vim with syntax highlighting, etc. This seems simple enough, but after many attempts, it's ...
1
vote
1answer
58 views
How do I highlight the current line and the cursor in .vimrc?
I am trying to highlight the current line as well as the cursor position in Vim. Here's my .vimrc:
set cursorline
hi CursorLine ctermbg=8 ctermfg=15 "8 = dark gray, 15 = white
hi Cursor ctermbg=15 ...
0
votes
1answer
25 views
Comment the if statement and the matching endif keyword
In vim, I can find the matching if statement and prepend the appropriate comment symbol. (e.g. %s/.alarm./#\0/g), but then I am left with dangling endifs that I have to find manually. I could simplify ...
1
vote
4answers
62 views
Editors Nano/VIM not using resources
Does anyone here know the resources it takes for editors to search and replace in a large file? The reason I am asking, is I have a 32 core server that HTOP is only showing one core at 100% when ...
2
votes
2answers
47 views
Live diff-mode editing in vim
I want a live view of diffs while I am editing a file. vimdiff is able to do something I want, like highlighting the differences between two files.
However there are two drawbacks of vimdiff that ...
1
vote
1answer
20 views
Is it possible to affect the behavior of all vim commands in normal mode?
Is there a way to affect the behavior of all vim normal-mode commands? Say, after every command succeeds, I want to trigger some post-behavior.
0
votes
0answers
33 views
Trouble with Vim Auto Commands from Learn Vimscript the Hard Way
I have been working through the examples and exercises in Steve Losh's book Learn Vimscript the Hard Way, and I have hit some serious trouble in chapter 12 on Auto Commands. I am running MacVim on ...
2
votes
3answers
619 views
Unmet dependencies
I am trying to compile vim and install with "--enable-pythoninterp" flag, which needs the python-dev package.
INFO
I obtained the vim source from ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2
Vim7.3 ...

