1
vote
1answer
49 views

Minimize the current width of a window in Vim

To maximize the width of a current window in Vim, we type: ctrl-w | Is there a similar alternative for minimizing a current window in Vim?
12
votes
2answers
405 views

What happens if I use vi on large files?

Though we were instructed not to, a colleague of mine used vi to view a large text file (server.log 3.5 GB). This filled up /var/tmp and caused some problems on the server. What caused this? Why ...
2
votes
1answer
316 views

vi creating a swap files before create a new file

This is a strange problem. the swap file get created for the new files. so, my directory is empty there is no file exist and then when I vi test.txt I get the swap file message. It looks like the vi ...
0
votes
0answers
75 views

How can I enable mouse in Vim?

How can I use mouse with panes in vim? I tried :set mouse=a but it does not seem to work when doing :sp or :vsp or vim -O
0
votes
1answer
28 views

Adjust pane size in vim

I know I can use :sp or :vsp to open files in vim in splitted panes. But how can I increase/decrease the size of each pane?
4
votes
1answer
97 views

Idle terminal safe character

I'm using iTerm2 on a Mac to do Linux work. In order to avoid losing terminal connections, I turned on "When idle, sent Ascii code". The default is 0. This works like a charm to keep connections ...
4
votes
1answer
125 views

How can I jump to files from vim opening them in a separate tab?

I have installed tags so I can jump to a function body in another file via CTRL + ] I know that I can do gf to jump to another file. I know that I can do CTRL-w s to split the vim window. What I don't ...
1
vote
1answer
94 views

Why is this copy/paste in vim configuration not working properly?

I have the following in my .vimrc vmap <C-c> y imap <C-p> <esc>P So that I can do my classic sortcut for copy/paste. It works fine on Cygwin but not in my ssh session to ...
0
votes
1answer
219 views

Tmux ranger integration: opening text files in new panes

Here we have some amazing tools: tmux, ranger, vim... Would be amazing to configure ranger to open the files (when text editable) in a tmux newpane? Is that easy and how it is done?
2
votes
1answer
179 views

vim and tmux are conflicting. How can I fix this? [duplicate]

I'm having a painful experience with tmux. I'm using solarized in vim but when I run tmux then my vim configuration does not work. It's as if solarized is not configured in my .vimrc. Out of tmux ...
-1
votes
1answer
99 views

How to use colors/colorschemes/fonts in vim effectively so that the text is as readable as possible

I am trying to be more productive in vim and as part of this I am trying to make the text presentation i.e. colors etc as nice to the eyesight as possible. Although I managed to change the default ...
3
votes
1answer
491 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 ...
1
vote
4answers
73 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 ...
3
votes
3answers
123 views

File goes missing for a short period of time after saving it using VIM

I am having a strange problem that seams to be caused by VIM, the Linux VFS cache, ecryptfs and/or something file system related: I open a file in VIM, modify it and save it. I try to access the ...
3
votes
4answers
479 views

Utilize a different user's vimrc as well as vim folder

First of all, to prevent an X/Y Problem, I'll just state that what I really want is: Run vim as the root user. Instruct vim to use my nice pretty color scheme and all my plugins. Do all this without ...
4
votes
1answer
1k views

How to allow Page Up in GNU Screen?

I use Vim to edit text files on Linux. Commonly I connect to remote Linux machines using PuTTY from Windows. I use GNU Screen commonly as well. When using Vim inside Screen I am unable to use the ...
2
votes
2answers
1k views

Help understanding modifiable in Vim

During a OS upgrade (Linux), Vim or some part of it has been updated as well. Now it happens that sometimes when I save a file (the file is not saved) I get this error: E21: Cannot make changes, ...
3
votes
4answers
10k views

“Swap file xxx already exists” when editing apache configuration file in vim?

Using vim I keep getting a message saying "Swap file xxx already exists" when I'm editing an apache config. However, I don't see it in the working directory on in tmp. How do I delete this?
4
votes
2answers
1k views

Vim NERDTree re-size vsplit

I am using the NERDTree plugin for Vim. When using the s: open vsplit command, is it possible to resize the windows so that the file takes up a larger portion of the screen than the directory tree?
4
votes
4answers
5k views

What causes swap files to be created?

As part of the program I wrote, I constantly read and write data from files. I noticed that as part of doing so, I am inadvertently creating swap .swp files. What do you think is going on? What would ...
33
votes
6answers
17k views

How can I edit multiple files in VIM?

I know I can open multiple files with vim by doing something like vim 2011-12*.log, but how can I switch between files and close the files one at a time? Also, how can I tell the file name of the ...
2
votes
2answers
675 views

How to Display Hidden Characters While Typing?

How can I configure vim to display hidden characters like tabs or spaces ONLY while those characters are typed? I do not want tabs and/or space replaced with special characters like ">" or "_" when ...
2
votes
1answer
54 views

How to Re-Create Missing Vim Directory?

The /etc/vim directory and the symlinks from /usr/share/vim to it are missing. Does anyone know how to re-create the directory and links?
4
votes
2answers
2k views

Using vim to view the contents of a directory file

As I understand, in Linux directories are mostly normal files w/ some special handling (e.g. 'rm' a file is ok; 'rm' a dir will complain w/o -r). When I execute the following bash commands: mkdir ...
3
votes
1answer
1k views

vim is too slow when saving files

I run vi under Linux CentOS 5.3. Each time I exit from a file, I have to wait several seconds before vi saves the file. The same thing happens with vim. I ran this command: strace -odetails -ff -f ...
7
votes
2answers
232 views

How do I get just the user-manual for Vim

To get the vim user-manual I am doing vi test and then, once the file is opened, I do :help user-manual This opens up a split window, which makes reading manual inconvenient to read. How do I ...
6
votes
7answers
840 views

Open a file given by the result of a command in vim

I find myself doing the following almost every day Run a find (find -name somefile.txt) Open the result in vim The problem is I have to copy and paste the result of the find into the vim command. ...
14
votes
3answers
3k views

How to fix Ctrl + arrows in Vim?

I am using Putty -> Suse box -> vim 7.2 combo for editing and want to remap Ctrl + arrows combo to a particular task. But for some reason, Vim ignores the shortcut and goes into insert mode and ...
7
votes
5answers
3k views

vim on FreeBSD does not react on arrow keys correctly and other vi-like behaviours

I tried to use vim on FreeBSD (via ssh on Linux xterm-compatible terminal). However vim behaves similar to vi out-of-box. For example it does not react on delete key, insert F character instead of ...