The vi tag has no wiki summary.
0
votes
1answer
52 views
iTerm2 Terminal Too Wide Error
I am using iTerm2 to ssh to various servers. When i use VI to edit a file i get an error that reads 'Terminal Too Wide.' To fix this I use the following command 'stty columns 120.' Is there a ...
0
votes
2answers
40 views
How to make VI use spaces instead of tab even when I press backspace key?
When I tried to use yml, it requires NO TAB, ONLY SPACE policy.
I realized I need a special setting for this.
Anyway, I can't live without tabs. So I want to make my VI behave like this.
When I ...
0
votes
5answers
73 views
0
votes
0answers
35 views
Readline in vi mode: how can I enable up/down arrows?
When bash has vi bindings available (set -o vi), up/down arrows work in both command and insertion mode. When I setup readline's ~/.inputrc to use vi mode (set editing-mode vi), applications like ...
10
votes
2answers
43 views
vi / vim abrumpt buffer movements within window
When using :set wrap in vi/vim, the contents of an entire wrapped line are placed in the display buffer upon moving the cursor into a new line, even when navigating through a file by display line ...
1
vote
1answer
143 views
how to block select, move, copy, paste in vi?
I am trying to migrate from Notepad++ to vi. In N++, I constantly rely on block edit (or "column mode"), as it is a great increase in productivity: I can select a rectangular area of text by pressing ...
2
votes
1answer
84 views
Whats the difference between vi editor in Red Hat linux and Ubuntu?
I realize a difference in vi editor of ReD Hat and Ubuntu. In my company, I'm working in Red Hat. In that, the vi editing commands working as usual. Say, 'dd' to delete,'p' to paste, 'yy' to yank, ...
0
votes
1answer
64 views
Mac OS X. Vi - E185 cannot find color scheme
Editing with vi in terminal gives the following error.
E185: Cannot find color scheme metacosm. I think the problem is not im my .vimrc (no strange carrage returns). I strongly suspect this problem ...
1
vote
1answer
82 views
Vi on Linux: show ^M line endings for DOS-format files
On Solaris, if you open a file in vi that has Windows line endings, this shows up as ^M at the end of every line.
On Linux, vi is cleverer and understands the Windows file format, and does not ...
0
votes
1answer
89 views
mingw/msys with vi, ctags support?
I'm trying to run vim on win7 inside msys (which isnt entirely necessary, i know i can run gvim in windows, but i'd like to be able to use vi inside terminal)
everything installs fine with mingw-get ...
1
vote
1answer
120 views
How to switch comfortably to vi command mode on the zsh command line?
In vi, I have mapped 'jj' to escape to be able to switch to command mode without using the annoying escape key. Now I want to have the same for command line editing for which I use vi-mode. I already ...
2
votes
2answers
52 views
Can I display emacs buffer modification history?
I've used vi for decades, but I'm trying to improve my emacs skills.
In vi, I often check the status of my buffer by issuing this command:
:w !diff - %
Is there a command in emacs that I can use ...
5
votes
8answers
173 views
vi / vim tutorial recommendations
Being a common tool for *nix System Administrators, I'm looking for recommendations for vi/vim tutorials. After seeing this 'how do I do [this] in vim' question in Stack Overflow, I realize that I ...
0
votes
2answers
42 views
Install VIM in Cygwin
I have installed cygwin in my windows machine and I have also selected some additional packages as part of my installation (like gcc etc). Now I want to add vim also to my existing cygwin set up. What ...
0
votes
2answers
22 views
Forcing highlighter to html in VI when it fails to recognize an input file
I'm having trouble editing HTML in an older version of VI(M).
VIM - Vi IMproved 6.3 (2004 June 7, compiled [...] 2005). When reading .sh shell scripts there is no problem, though.
It doesn't ...
1
vote
1answer
47 views
Vi: how can I paste the last string of text that I entered when I was in insert mode?
How can I paste the last string of text that I entered when I was in insert mode? I think I've done this before on accident but I can't recall how.
2
votes
3answers
140 views
Linux: How can I edit all the files returned by find in vi?
Something I find myself doing a lot is running a find command and then editing all of them in vi, which looks something like this:
> find . "*.txt"
./file1.txt
./file2.txt
./path/to/file3.txt
...
0
votes
0answers
65 views
Vim shell bindings (set -o vi) on iTerm2
Trouble with history when using bash vi bindings on iTerm2 on Lion. (I had the same problem with iTerm when I switched to Lion.)
Hard to explain exactly, but when I hit k to go to most recent ...
0
votes
0answers
28 views
How do I set the meta key with the meta convert feature in most *nix terminals?
.Xdefaults:
xterm*eightBitInput: false
This command apparently allows you to use a meta key + something to enter vi editing mode in a linux terminal. But what is the meta key and how do you set the ...
0
votes
1answer
16 views
How can I save settings in VI?
I have changed tab settings in VI with set tabstop=4. But when I restart VI, the settings are restored. How can I save the settings?
4
votes
2answers
55 views
Getting vi/vim syntax highlighting used by certain user
At work most web-development we do, is done in vi/vim, on a debian-server.
Sometimes we have to alter some files as root, and the syntax-highlighting-model of that user (root) is absolutely awesome. ...
3
votes
1answer
167 views
How can I edit a google doc with vi and automatically update the original doc in the cloud when I write the file?
I'm using ubuntu 11.04. I have installed googlecl which claims to allow me to edit google doc files with vim. I have a google doc "test":
google docs edit --title "test" --editor vim
opens the file ...
2
votes
3answers
56 views
Target one line only in vim for a text substitution
Is there a way in vi(m) to target one specific line in a file for a string substitution?
I need to frequently add SSL SHA fingerprints from Web servers to my Mercurial .hgrc. I can grab the required ...
1
vote
1answer
240 views
How to copy and paste between cygwin's vi/emacs and windows clipboard?
I tried to paste what I copied in windows clipboard into cygwin's vi or emacs, and it doesn't seem to work with yy (vi) or M-w (emacs).
Is there a way to do it? I learned that /etc/clipboard has the ...
3
votes
3answers
70 views
VI adding # moves cursor to beginning of the line
Why does vim move me to the begining of a line when I press # for a comment or remark say in a perl file?
Why would I not want my comment to be indented at the same level of the current code?
1
vote
2answers
43 views
CTRL-\ vs <C-\> in Vim help
From Vim documentation:
Additionally the command CTRL-\ CTRL-N or <C-\><C-N> can be used to go to
Normal mode from any other mode.
So what is the difference between CTRL-\ and <C-\>?
...
0
votes
0answers
106 views
Why can't I open a text file I just created?
I'm on Fedora distro server and OSX on Mac as client connected via crossover cable using a local IP. Fedora is serving web pages and the Mac is browsing and connected via ssh on the terminal. I was ...
7
votes
3answers
133 views
vi: how can I jump to end of file with a new line appended?
Here's an answer I want about 5 times a day.
In vi, the command to go to the end of the file is G.
But that always leaves me at the start of the last line of the file, if files don't have a blank ...
1
vote
1answer
45 views
Readline in vi mode: how can I access previously executed commands?
I recently followed this post's advice on how to make vi more ubiquitous and I changed my readline mode to vi. Before I did this, I could use the arrow keys to access previously executed commands. ...
0
votes
2answers
339 views
Ubuntu + Unable to Edit .bashrc file because of ReadOnly
To Remove Issue of
WARNING: Unable to verify SSL certificate for api.heroku.com
To disable SSL verification, run with HEROKU_SSL_VERIFY=disable
By Googling I got few solution. One of them is added ...
3
votes
6answers
1k views
UNIX - How to copy and paste between different bash windows with files opend with VI?
Lets say I log in to bash, open a file in vi, then using alt-f2 I open a new terminal. After logging in I navigate to a second file and open that in vi. How can I CnP between these two files?
I found ...
2
votes
2answers
85 views
non-destructive piping in vim?
Is there a way to pipe selected text through an external command in vim, but not to replace the selected text with the output? Occasionally I want to copy something in a vim buffer to the X clipboard, ...
1
vote
1answer
86 views
How to connect an old dumb terminal to a modern PC?
Could one connect an old dumb terminal to a modern PC? I have this fantasy of hacking around with some vi on an old ADM-3A, but have no idea if it's networkable with modern hardware.
2
votes
2answers
153 views
How to use a pipe to edit a file with vi
Lets say I have a file called file.txt. In it is a name of a file that I want to edit with vi. I want to do something like this so that I can edit the file:
cat file.txt | vi
However, that doesn't ...
0
votes
3answers
41 views
How to using redirection to create a file
I have a linux script that generates a string and prints it to the console. I want this string to be the name of a file and open it for editing in vi. How can this be done?
0
votes
1answer
35 views
How to navigate word-wrapped text files in vi
I find that navigating text files that have been word wrapped somewhat difficult in vi. If there is a line that is word-wrapped and it goes down several lines, then it is hard to navigate around this ...
1
vote
1answer
77 views
bash vi mode: what is (arg: N)?
I am using vi mode in a bash shell.
If I enter insert command mode and type a number from 1-9 (eg: 5, in the example below), I get the following prompt:
(arg: 5) <cursor>
What does this ...
0
votes
2answers
72 views
Is there a setting that will allow vim to remember the column it was on, even if traverses a line who's EOL is less?
Is there a setting that will allow vim to remember the column it was on, even if traverses a line who's EOL is less?
Consider the following lines:
foo bar
foo
foo bar
Say my cursor position is the ...
1
vote
2answers
251 views
how to write into file after doing sudo vi /dir to file
i have ubuntu 10.10 installed on a box.
and i ssh to it from another computer.
when i do sudo vi /var/www/page.php
i enter a text editor. when when i try to type i hear that ding noise as in i cant ...
1
vote
2answers
140 views
Create file with 751 permissions at creation
I keep creating practice perl scripts in a linux directory using vi <filename> and need to chmod 751 <filename> before I can run it as I wish to. I'm sure there is a simple way to default ...
0
votes
1answer
382 views
How to pass vim buffer contents through shell command and capture the output to a split window
I've read lots of threads about running shell commands from vim, lots of documentation on vim commands, .vimrc and all that, but I just can't seem to understand the "ex" language or vim mappings well ...
0
votes
2answers
115 views
Why is my vi Editor highlighting all the text?
All of a sudden all the text in my vi editor is highlighted.I have no idea how this happened. Please help.
1
vote
1answer
62 views
vim - tab awareness
If I am writing code like this in vim:
def my_function
and I hit enter, I would like the cursor to be positioned below the d.
Currently it is positioning the cursor as far left as possible.
How ...
1
vote
1answer
30 views
How to return to where I was just now in vi/vim?
After G to go the the end,how to return to where I was just now?
2
votes
2answers
247 views
Ubuntu/Gnome copy and paste problem
I am having a peculiar problem with copying and pasting from a terminal in vim. Sporadically, copy-paste will refuse to work. Control-Shift-C and Control-Shift-V cause nothing. Often, after ...
2
votes
5answers
104 views
Repeating through lines in vim
I have some lines of text like this:
firstName
lastName
email
Now I add private readonly string to the start of the first line. How do I repeat this edit for the other lines? (not manually visiting ...
0
votes
2answers
587 views
How can I enable backspace key in VI?
I have bare-bone FreeBSD installation. No package installed. And VI doesn't accept backspace key. (I pressed backspace key but nothing happen)
How can I enable backspace key in VI?
Oh, and I'm using ...
3
votes
3answers
473 views
Display invisible characters in vim
When I compile my source with Latex, I get the following error message
Unicode char \u8: not set up for use with LaTeX.
Now I suspect that this is due to an invisible character. The command ...
6
votes
2answers
415 views
Any IRC clients with VI key binds?
Is there any IRC client that supports VI keys? The ''obvious'' script VimIRC is and has been broken for so long it's not even funny.
Do you know any IRC clients on Linux, GUI or Curses, that provides ...
1
vote
1answer
259 views
Can I use vi keybindings in the Chrome/Safari JavaScript console?
I'd like to be able to use vi keybindings in the Chrome JavaScript console (cmd-opt-J in OS X, ctrl-shift-J elsewhere, I think). Basically, I want to be able to hop around and edit like I do in vim.
...