1
vote
4answers
87 views

Symlink everywhere

Is there any way for me to symlink a particular file so that it appears in every directory on the system? So if I symlink /tmp/scratch No matter where I am I can type vi scratch?
1
vote
1answer
40 views

vim flag to append a line and save

I'm trying to mock an editor as part of writing feature tests for a CLI that I'm working on. I need to mock an editor which is opened and quit directly without saving, as well as an editor which ...
1
vote
4answers
53 views

Exracting fields in file and storing it in different file in vim

I have file int the following format: . . . Name:abc Occupation:def . . Name:xyz Occupation:ghi . . I want to extract the name and occupation field and save it in another file out.txt ...
3
votes
2answers
95 views

How to switch to editing command in text editor [duplicate]

When typing a complicated command that started on the command line in Bash, how do I switch to editing it with ViM?
8
votes
2answers
561 views

What is meant by a shell is in “vi” mode or “emacs” mode?

This question follows directly from the answer to one of my previous questions here. I am newbie to unix world and this site has helped a lot to understand some core concepts. In this case I am ...
5
votes
2answers
2k 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 ...
9
votes
2answers
336 views

Trying to “locate” and then open a file

Suppose that I have a file named filename123.txt and it is the single file that is named so, and I can locate it with the command locate filename123. And it returns only this file. Now I want to open ...
9
votes
1answer
871 views

How to have tail -f show colored output with vim?

In this question, Gilles answered Yet another possibility is to run tail -f in an Emacs shell buffer and use Emacs's syntax coloring abilities. Because I'm a vim user, I'd like to do this with ...
1
vote
1answer
97 views

Is “temp” a reserved system name?

I was doing homework on a remote server, and I realized that I had my header and cpp files swapped. So, I wanted to change the names. I began by renaming my header file 'temp'. Then, weird things ...
3
votes
1answer
404 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 ...
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?
1
vote
1answer
3k views

Use configuration file for ftp with auto login enabled upon initial connection

I would like to so the same thing like in SSH where you can save the server in the config file. I would also like to save my username and password, so that it is not prompted each time I connect. I ...
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 ...
4
votes
2answers
942 views

How to install light-weight vim and to be able to efficiently load files into one instance vim?

On my laptop with Ubuntu I'm able to have just one instance of vim, launched with vim --servername VIM After this I'm able to open files from console with vim --remote-silent filename I use ...
1
vote
5answers
803 views

Display output to console while grep is used

In vim I use the following command to compile a tex file: pdflatex\ \-file\-line\-error\ \-shell\-escape\ \-interaction=nonstopmode\ $*\\\|\ grep\ \-P\ ':\\d{1,5}:\ ' this works in terms of getting ...