All Questions
424
questions
233
votes
6
answers
230k
views
Git commit in terminal opens VIM, but can't get back to terminal
Trying to learn GitHub at the moment and doing this Git essentials tutorial over at nettuts. I'm on the lesson about making commits.
The teacher types git commit and it opens VIM as his editor (I'd ...
131
votes
3
answers
63k
views
What is a .un~ file or why does Vim in the Terminal make the .un~ file?
I've noticed I have some dotfiles that end with .un~
For example I have a .vividchalk.vim.un~, but I'm not sure where that came from.
It seems like they are created when I use Vim in the Terminal.
...
114
votes
8
answers
59k
views
Ubuntu, Vim, and the solarized color palette
I'd really like to get in on all the colorful goodness of the solarized colorscheme, but I can't seem to get it configured just right.
I have the main solarized file in my .vim/colors folder, I've set ...
105
votes
4
answers
65k
views
VIM: how to go to exact line on Ubuntu
I'm using vi on Ubuntu 12.10. Some files are quite long so when I want to go to the middle of the file, I have to page down or scroll down.
Is there a VIM shortcut to go to an exact line number?
95
votes
11
answers
54k
views
Scrolling inside Vim in Mac's Terminal
I've been googling around trying to figure out if it's possible to use my mouse wheel to scroll while inside Vim in Mac's Terminal, with no luck. It seems as if only X11 or iTerm support this.
Before ...
82
votes
6
answers
90k
views
set vim background transparent
I am using the Matrix colorscheme along with CSApprox for my terminal vim.
I can not seem to be able to set the background as transparent. I have tried editing the matrix.vim file but it doesn't make ...
80
votes
6
answers
288k
views
How to use vim in the terminal?
How does one setup and start using vim in the terminal on OS X?
I want to start writing my C code using vim in the terminal rather than a separate text editor. How does one get started on this?
The ...
75
votes
2
answers
21k
views
Mac terminal Vim will only use backspace when at the end of a line
I seem to have something odd with either my Mac 10.6 terminal or my .vimrc.
When I type backspace on my laptop's keyboard, it only works when the cursor is at the end of the line. Trying to delete ...
69
votes
6
answers
28k
views
Pasting code into terminal window into vim on Mac OS X
When I paste code into my Mac OS X terminal window into vim it indents each line. For each line it adds an indent so the text looks like this...
"ut labore et dolore magna aliqua. Ut enim ad minim ...
58
votes
6
answers
26k
views
Alt key shortcuts not working on gnome terminal with Vim
I'm running Vim on a gnome terminal. But the alt key mappings are not working. For example:
:imap <A-i> <Esc>
It works fine in GVim. But when I run the same command with Vim in the ...
52
votes
12
answers
125k
views
OS X Terminal UTF-8 issues
Okay, so I finally got myself a MacBook Air after 15 years of linux. And before I got it my big concern was UTF-8 support because no matter if I get files sent to me from windows or mac-clients theres ...
52
votes
3
answers
28k
views
Strange behavior of vim color inside screen with 256 colors
I was trying to make the syntax highlighting (with 256 colors) of vim work inside screen, which is running inside gterm.
It works quite fine in the beginning. What I mean by "in the beginning" is, ...
51
votes
6
answers
19k
views
Error message when starting vim: "Failed to set locale category LC_NUMERIC to en_CH" (or en_BR, en_RU & LC_TIME, LC_COLLATE, LC_MONETARY, LC_MESSAGES)
I freshly installed vim (Vi IMproved 8.1) as a text editor on my MacOS 10.14.5 with Homebrew. Each time that I run vim I get this error message:
Warning: Failed to set locale category LC_NUMERIC to ...
50
votes
2
answers
24k
views
Can terminals detect <Shift-Enter> or <Control-Enter>?
Is it possible for the terminal to detect ⇧ Shift+Enter↵ or Ctrl+Enter↵ keypresses?
I am trying to configure vim to do key mappings that use these sequences, and while they work fine in gvim, they ...
49
votes
4
answers
50k
views
Why don't most vim color schemes look as nice as the screenshot when I use them? [closed]
I have downloaded many vim color schemas and tried them out, but many of them don't look like the official screenshot.
For example, vim's own color schema - desert should look like this:
But in my ...
49
votes
10
answers
66k
views
E185: Cannot find color scheme solarized
I have Solarized installed via pathogen and it's been working fine in both terminal and MacVim on my Mac. Today, I tried setting up an Ubuntu box on Linode. I just cloned my dotfiles and symlinked to ...
46
votes
2
answers
53k
views
Vim: Difference between t_Co=256 and term=xterm-256color in conjunction with TMUX
I am testing the various different terminals that I tend to use to SSH into Linux boxes that I have Tmux set up on.
Basically I noticed this behavior, and I am hoping that somebody could offer an ...
44
votes
2
answers
88k
views
Vim: No write since last change, even though I changed the file [duplicate]
I'm trying to set up a file on my ubuntu machine, but when I try to change the contents before saving the file I've just created, vim returns the error: No write since last change.
I've created the ...
43
votes
5
answers
72k
views
The "git" command requires the command line developer tools. Would you like to install?
I'm super new to coding (actually trying to teach myself some Python), but there's a thing bugging me that I cannot seem to find any info online about my particular case: When I run git on the ...
35
votes
2
answers
7k
views
How can Vim stop responding?
With an intention to increment a number in a line in Vim, I pressed Ctrl+A. To my wonder Vim stopped responding! Later I realized that I had actually pressed Ctrl+S.
Can somebody please explain this ...
29
votes
13
answers
21k
views
Arrow keys type capital letters instead of moving the cursor
I've installed the latest vim using homebrew and also installed mac-vim from the google code homepage.
in mac-vim everything works fine. but when I run vim in terminal.app in mac and go to insert mode ...
29
votes
3
answers
18k
views
How do I open a terminal application from node.js?
I would like to be able to open Vim from node.js program running in the terminal, create some content, save and exit Vim, and then grab the contents of the file.
I'm trying to do something like this:
...
22
votes
5
answers
6k
views
How to use vi to edit a command in terminal on Linux?
When typing a very long command, I'd like to first edit the command in a text editor(e.g. vi) then execute in case of typos. Is there a way to edit the command directly in a terminal and run instead ...
21
votes
3
answers
25k
views
Vim Input is not from a terminal [duplicate]
which django-admin.py | vim
Vim: Warning: Input is not from a terminal
Vim: Error reading input, exiting...
Vim: Finished.
What is the easiest way to fix this? And actually make vim to open "/usr/...
21
votes
6
answers
10k
views
Problems with Vim and lua?
I installed yadr onto my terminal, but I keep getting the following error when I open Vim:
neocomplete does not work this version of Vim.
It requires "if_lua" enabled Vim(7.3.885 or above).
EDIT:
...
21
votes
2
answers
7k
views
Vim: Encoding (Unicode) in Terminal under Windows
I don't know why, but this topic seems to be badly documented and is covered with controversies as nobody knows the real answer (except for maybe Mr. Moolenaar, who rarely answers anyway).
So ...
21
votes
5
answers
10k
views
How make Vim fill Terminal window
When running Vim in a Terminal, the vim window does not fill the entire screen space, which is very irritating when the terminal background color radically differs from vim's. Admittedly, one might ...
19
votes
3
answers
23k
views
Custom colorscheme not working on VIM
Here's what I did:
cp ~/.vim/colors/ir_black.vim /usr/share/vim/vim72/colors/
Then tried to open some code and :colorscheme ir_black
It changes a few colors but makes most of the text start to ...
19
votes
3
answers
3k
views
Why does "locate filename | xargs vim" cause strange terminal behaviour?
When I do "locate 50local.policy | xargs vim", I get the error "Vim: Warnung: Die Eingabe kommt nicht von einem Terminal" (translation: Vim: Warning: The input does not come from a terminal).
I can ...
18
votes
6
answers
75k
views
copy and paste in vi
I don't have a huge amount of experience using VI. I am running it on Mac OSX.
I've copied and pasted text before in the editor using (when I say gui in the following I mean the Mac OSX gui)
Cursor ...
18
votes
6
answers
21k
views
Issues with solarized and Terminal.app
I really apologize because I know that this question has been asked multiple times. I have gone through all of the previous questions, but I still have yet to have any luck setting up the Solarized ...
18
votes
2
answers
12k
views
Copy and paste in vim via keyboard between different mac terminals?
Can anyone help me with this:
I'm trying to figure out how to copy and paste text between 2 different instances of vim on different terminals (using iterm2 or mac terminal). I can do it using the ...
18
votes
2
answers
5k
views
Creating a ctrl+tab keybinding in PuTTY
I'd like to be able to map the vim commands :tabnext and :tabprev to CTRL+TAB and CTRL+SHIFT+TAB respectively. Unfortunately, I seem to be running into the problem where PuTTY eats these character ...
17
votes
1
answer
10k
views
How to run Vim commands from Terminal
My questions is one that I haven't seen answered, the usual question is how to run certain commands to a file.
My question is how to run Vim commands or functions, from outside Vim (i.e. Terminal), ...
14
votes
1
answer
908
views
Using vim, what is " '<,'>"?
While using Vim, in visual mode, selecting text and then calling a colon command shows : '<,'> instead of just : as it would show when I do other things (such as opening a file).
What does '&...
14
votes
7
answers
8k
views
Enabling italics in vim syntax highlighting for mac terminal
I'd like to have vim display my comments in italics, and I understand I need to place
cterm=italic
in the
hi Comment
line in the color.vim file I'm using. This, however, is having no effect on the ...
13
votes
4
answers
5k
views
Smart indenting in vim (normally great) is a disaster when pasting in a chunk of code
I guess other editors are smart enough to turn that stuff off for pasting but when using vim in a terminal it can't distinguish between pasting and actual typing.
What kinds of solutions or ...
13
votes
7
answers
23k
views
Mac OS X vim colors mangled
Here's my setup
Mac OS X 10.6
VIM (default version that comes with OSX 10.6)
rails.vim (installed in .vim/autoload)
ir_black.vim (installed in .vim/colors)
i have "colorscheme ir_black" and "syn on" ...
13
votes
2
answers
9k
views
Terminal emulator or shell with vim-like commands [closed]
I've kind of become vim crazy these last few months, using plugins like Vimium to control chrome. I currently use iTerm2, but I was wondering if there were any terminal emulators or shells that use ...
12
votes
3
answers
41k
views
How to exit the insert screen in mac terminal
Merge branch 'develop' into peakfront
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting ...
12
votes
2
answers
30k
views
How do I deal with vim's swap file system?
When using vim in ubuntu, I accidentally pressed ctrl-z which suspended my session of vim. I was editing a file (I'll call it test) which was not saved.
When I opened the file again in vim, I got the ...
11
votes
6
answers
8k
views
Backspace in Terminal Vim (Cygwin)
I'm running a default cygwin install on Windows 8 and can not get the Backspace key to delete characters - I'm expecting the character to be overwritten with a blank when I backspace.
I've tried
...
11
votes
6
answers
2k
views
reuse vim instance from linux terminal
By making use of the remote feature in vim, is it possible to reuse an instance of vim to load up multiple files as needed.
It will be nice to have that facility from within the same terminal ...
10
votes
2
answers
4k
views
How do terminal size changes get sent to command line applications though ssh or telnet?
How do terminal size changes get sent to command line applications through ssh or telnet?
A user connects to a remote machine with ssh or telnet.
They start editing a document in VIM.
Then they ...
10
votes
2
answers
9k
views
Cursor color in vim terminal OS X Mountain Lion
I want to make the cursor and selected text easier to read in vim (white background, black foreground), so i've done
hi Visual guibg=white guifg=black gui=NONE ctermfg=black ctermbg=white cterm=...
10
votes
1
answer
2k
views
Disable cmd+k when using Vim in terminal?
So when I'm using Vim in the mac osx terminal I accidentally enter the command cmd+k that clears my terminal because I'm used to the motion, this makes me have to exit vim and enter again. I want to ...
9
votes
16
answers
11k
views
Do you use VIM/Emacs/Terminals to develop C/C++? What kind of projects is this practical for?
For those who are using vim/emacs/terminals,etc (ie, not an IDE proper) what sort of projects are you working on? Are they big? Production? Are these the tools you use at work? Or mostly for smaller ...
9
votes
2
answers
31k
views
How to delete columns in vi file? [closed]
I have a vi file containing hundreds of lines with the following format
029.inp.log: SCF Done: E(RHF) = -844.790844670 A.U. after 26 cycles
I want to delete all of the columns (...
9
votes
5
answers
3k
views
When I try to run vim in command line I get Python errors
When I try running vim in the Terminal (so as to follow @romainl's suggestion in my other question) I get lots of Python errors, which all boil down to:
IOError: invalid Python installation: unable ...
8
votes
2
answers
6k
views
Set terminal title to current file name and path with Vim
I would like Vim to send the name of the currently open file to macOS Terminal.
It is possible to tell the macOS terminal the filename of a currently open document by sending the escape sequence \e]6;...