1
vote
2answers
50 views

Machine keeps backups of files that I have already deleted

I recently found out that my machine keeps backups of files that I have already deleted. For example, a file called a.svg that I have deleted in the past, still exists in the directory it was deleted ...
11
votes
4answers
521 views

How am I supposed to edit files on a network with Vim?

Currently I'm doing it by SSHing into a server, and executing Vim on the server. This has the benefit of not having to deal with cumbersome syntax of opening files from a remote server over SCP, and, ...
6
votes
1answer
879 views

Rename current file in vim

Searching over net shows :f filename would rename the current file in vim. But executing this and later exiting vim, shows the new file with all the contents and also the old file is present with the ...
6
votes
3answers
600 views

How can I open a file in VIM in readonly mode if it already has a swapfile?

When I use the command :e filename to open a file and this file is already opened by another vim instance, I get a prompt asking me if I want to open the file in read-only mode, edit anyway, recover, ...
3
votes
1answer
112 views

How to display the permissions of a new file in the status line of the Vim editor?

With the following piece of code I get the permissions for an existing file: augroup Get_file_perm autocmd! autocmd BufWinEnter,FileChangedShell * let w:file_perm=getfperm(expand('%:p')) augroup ...
4
votes
3answers
2k views

vi/vim, how can I write out a number of lines to a new file

I have a bunch of lines that I want to write out to a different file. How can I do that?
5
votes
1answer
568 views

gvim -p limit of opened tabs?

When I run : gvim -p *.xyz I find that not all files are opened in tabs. It feels, like a kind of tab limit? But ! When I try to open unopened with : :tabnew it is opened next to previous ...
38
votes
8answers
21k 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 ...