All Questions

Tagged with
Filter by
Sorted by
Tagged with
517 votes
15 answers
149k views

Using Caps Lock as Esc in Mac OS X

How do I make Caps Lock work like Esc in Mac OS X?
indentation's user avatar
  • 9,955
276 votes
12 answers
177k views

How to run mvim (MacVim) from Terminal?

I have MacVim installed and I am trying to set it up as the editor for Git (version control), but I can't run 'mvim' from the command line as it isn't recognised. How do I setup mvim so I can run it ...
Fred's user avatar
  • 4,817
261 votes
26 answers
122k views

lose vim colorscheme in tmux mode

I'm running iterm2 and when I'm in tmux mode the colorscheme I have set in vim does not show up. Only the color scheme I've set in iterm. If I run vim from shell the colorscheme appears correct - its ...
tristen's user avatar
  • 4,675
244 votes
4 answers
144k views

What is the difference between MacVim and regular Vim? [closed]

I'm reasonably new to OS X, but I'm familiar with Vim from using it in various *nix systems. I've seen many people recommend running MacVim over Vim in the terminal. Can anyone tell me what ...
Mark Costello's user avatar
236 votes
28 answers
143k views

How to copy a selection to the OS X clipboard

I have an area selected in Vim. How can I copy it into the OS X clipboard? (The OS X clipboard can be written to via a pipe to /usr/bin/pbcopy)
ʞɔıu's user avatar
  • 47.9k
130 votes
4 answers
172k views

How can I install MacVim on OS X?

I am using OS X 10.9.1 (Mavericks). What are the systematic steps to install to Gvim or MacVim in Mac OS? If you write the steps using 1, 2, 3, ..., it would be easy to follow. I must confess that ...
hbaromega's user avatar
  • 2,342
120 votes
5 answers
103k views

Vim Insert Mode on Mac OS X

Apparently Mac keyboards don't have an Insert key (or maybe they do but I can't find it). How can I get to insert mode in vim on a Mac?
Tamas Czinege's user avatar
116 votes
8 answers
115k views

Update built-in vim on Mac OS X

I know this might be more appropriate at Ask Different, but as I tried adding tags there, there was no vim tag, only macvim. So I figured I might get a better audience here. In the Terminal, I do the ...
Kit's user avatar
  • 31k
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 ...
hora's user avatar
  • 3,731
88 votes
11 answers
76k views

Incorrect colors with vim in iTerm2 using Solarized

I am having a strange issue with iTerm2, in terminal vim (non-gui) and the solarized color scheme. First, I have set iTerm2 to use the dark solarized colour scheme. I am also using solarized for vim. ...
Zameer Manji's user avatar
  • 3,015
88 votes
19 answers
59k views

vim + COPY + mac over SSH

I access a sever over ssh on which I run vim for editing files. When I try to yank text from vim into an editor locally on my mac (lion) either with y OR "+y it does not work. I end up with the text I ...
evolution's user avatar
  • 4,522
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 ...
some_id's user avatar
  • 29.6k
78 votes
14 answers
126k views

Why I've got no crontab entry on OS X when using vim?

I would like to use cron on my Mac. I choose it over launchd, because I want to be able to use my new knowledge on Linux as well. However, I cannot seem to get the crontab -e command to work. It fires ...
mollerhoj's user avatar
  • 1,328
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 ...
cflewis's user avatar
  • 7,331
72 votes
6 answers
94k views

How can I activate Vim color schemes in OS X's Terminal?

I'm working with the Vim 7.2 that comes with Mac OS 10.6.1 (Leopard), using the Mac's "Terminal" app. I'd like to use a fancy color scheme. I did this... :syntax on Then this... :colorscheme slate ...
Ethan's user avatar
  • 58.9k
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 ...
eat_a_lemon's user avatar
  • 3,176
68 votes
12 answers
145k views

Vim Can't Save File (E212)

Sometimes when I create a file using vim some/path/newfile, vim lets me edit it, only to complain when I attempt to save my changes. E212 Can't open file for writing. This appears to happen only ...
StuWeldon's user avatar
  • 697
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 ...
Sami's user avatar
  • 551
52 votes
7 answers
19k views

how do I detect OS X in my .vimrc file, so certain configurations will only apply to OS X?

I use my .vimrc file on my laptop (OS X) and several servers (Solaris & Linux), and could hypothetically someday use it on a Windows box. I know how to detect unix generally, and windows, but how ...
iconoclast's user avatar
  • 22.1k
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 ...
ecjb's user avatar
  • 5,291
51 votes
5 answers
12k views

Using vim for git commit messages broken after updating janus

After updating the janus vim distribution there appears to be a problem with using vim for commit messages. The best example of this is when doing a git pull to get someone else's changes. The vim ...
Nat Ritmeyer's user avatar
  • 5,662
42 votes
7 answers
77k views

Where is the default vimrc located on Mac

Where can I find the default vimrc on Mac when there is no ~/.vimrc. On some Linux its located in the /etc/vimrc
isethi's user avatar
  • 705
38 votes
4 answers
41k views
+200

How to map mac command key in vim?

I want to map my NERDTREE toggle to Cmd + space but I don't know what character represents Mac's command key in .vimrc. I searched and found that we can use 'D' to represent cmd key from this link, ...
UtkarshPramodGupta's user avatar
36 votes
7 answers
52k views

iterm vim colorscheme not working

When I run vim from the command line in iTerm, syntax highlighting doesn't seem to work locally. In vim for example I have installed a nice colorscheme that works quite well in MacVim but it would ...
Derek Organ's user avatar
  • 8,393
35 votes
13 answers
10k views

What are the preferred versions of Vim and Emacs on Mac OS X? [closed]

For those of us that like to use the graphical version of Vim or Emacs, instead of the console version, which version do you recommend? For Vim, there's Mac OS X Vim, MacVim, Vim-Cocoa. For Emacs, ...
Michiel de Mare's user avatar
32 votes
6 answers
13k views

vim ruby mismatch on Mac High Sierra

I recently upgraded my Mac to High Sierra After the upgrade, Macvim (mvim) stopped working because (I assume) HighSierra upgraded ruby to 2.3, and mvim is using ruby 2.0. Following is the error I am ...
user2960993's user avatar
31 votes
3 answers
10k views

How to run spell check on multiple files and display any incorrect words in shell script?

I have a few files I wish to spellcheck. Normally I would open these in vim, run :set spell and do the changes. It's really teadious to open files and manually check if I've misspelt any words since ...
simont's user avatar
  • 70.7k
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 ...
Allen Bargi's user avatar
29 votes
6 answers
32k views

Installing vim with homebrew assistance

I tried to install YouCompleteMe on Mac for vim, but I've been using the system vim which is version 7.3. I tried to update my vim using homebrew by typing brew install vim and everything seemed to be ...
user3746602's user avatar
28 votes
2 answers
31k views

Adding a git commit message using vi on OS X

I'm learning using Git on an OS X Terminal. It seems really easy. But I can't handle just one problem: When I try to merge two branches, for example "myTestBranch" into "master" this program covers ...
GitForJava's user avatar
28 votes
2 answers
12k views

Install Ruby support for VIM on Mac OS X

Mac OS X 10.6 (Snow Leopard) has VIM pre-installed (version 7.2), which is great. It also has Ruby pre-installed (version 1.8.7) which is great too. However, I want Ruby autocompletion in VIM. ...
JoHaan's user avatar
  • 283
27 votes
3 answers
22k views

default buffer size to copy/paste in vim?

I was trying to copy 150 lines from a vim session to paste into another. My first thought was to go for 150Y I did :q, then vim (otherProgram).py, and pressed 'p'. Only 50 lines copied over. So I ...
corvid's user avatar
  • 11k
25 votes
4 answers
13k views

How to get Cmd-left/right working with iTerm2 and Vim (without requiring .vimrc changes)?

I want to be able to use Option-left and Option-right to skip words (and Cmd-left/right to go to beginning and end of lines) within Vim as it does at my shell prompt. My Iterm2 preferences have ...
Dolan Antenucci's user avatar
25 votes
2 answers
23k views

git: new blank line at EOF

So I run git diff --check before add-ing files and commit-ing them, and on two specific files I get path/filename:linenumber: new blank line at EOF. If I delete the last empty line in those files, I ...
Maxim Chetrusca's user avatar
25 votes
8 answers
9k views

vim compiles with wrong python version (and not working with needed version)

In brief: I have a problem with compiling vim with preferred python version. When I use --enable-pythoninterp it compiles with system OSX python version. When I use --enable-pythoninterp=dynamic I ...
oluckyman's user avatar
  • 3,746
23 votes
2 answers
13k views

Apple's vim always used instead of homebrew

I'm seeing something very odd, and honestly I'm stumped. The version of vim that comes with mac is outdated (7.3 instead of 7.4). I'm trying to install vim from homebrew, and I want to use that one ...
kgreenek's user avatar
  • 4,984
23 votes
4 answers
17k views

How can I fix my delete key in VIM over ssh? (Mac OS X)

When I use VIM in the terminal on my local machine (Mac OS X Snow Leopard), the delete key is really backspace (i.e., destructive backspace). When I SSH into a particular server, for some reason it's ...
Aeonaut's user avatar
  • 1,267
22 votes
2 answers
41k views

where is ~\.vim folder in mac os? and how to install themes in gvim?

I downloaded color sample pack from http://vim.sourceforge.net/scripts/script.php?script_id=625 it says i should unzip and place it into ~/.vim but where is this folder? I tried unzip it to my usr/...
pythoniku's user avatar
  • 3,602
19 votes
3 answers
22k views

Executing Vim commands in a shell script

I am writing a Bash script that runs a command-line program (Gromacs), saves the results, modifies the input files, and then loops through the process again. I am trying to use Vim to modify the input ...
Nikolkj's user avatar
  • 373
19 votes
1 answer
13k views

How to set inoremap/nnoremap to "command key" on Vim?

I would like to assign operation to a command key in Vim. Aren't any methods?
ANNotunzdY's user avatar
18 votes
3 answers
17k views

VI Editor : Yank the entire file to clipboard (specific to OS X)

Is there any way to copy all lines from a file to clipboard in VI editor. I have tried *yG, +yG, "+yG and :%y+ from previous posts in SO, but nothing works in OS X.
Antony Thomas's user avatar
18 votes
4 answers
8k views

$PATH variable not properly set in gvim/MacVim when it is opened from the finder

I am using MacVim (basically gvim for the mac). If I open macvim from the command line then my $PATH variable will be properly set. If I open macvim via point and click with the finder, the $...
sixtyfootersdude's user avatar
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 ...
Eddy's user avatar
  • 6,731
17 votes
2 answers
60k views

How to switch to edit mode of vi on mac terminal [closed]

I am new to mac, trying to edit a .gitignore file from the macbook terminal, I type vi .gitignore it opens the file but not letting me switch to edit mode. How does vi switches mode on mac ?
Ahmed's user avatar
  • 14.8k
16 votes
5 answers
9k views

How can I enable VIM for mac in Visual Studio?

I just got Visual Studio for my Mac. Although in Beta, it seems nice. Unfortunately, I can't seem to figure out where VIM could be. I've searched the marketplace, but cannot load any file or extension ...
Ryan Shocker's user avatar
15 votes
12 answers
16k views

Reasons for using command line Vim versus GUI Vim [closed]

Background I'm building an application where it detects what documents you're using from the file system. To do this it must access the AXDocument attribute of the active window. MacVim provides this....
15 votes
2 answers
22k views

How to disable mouse in vim window when it's enabled by "set mouse = a"?

Hi: I'm using vim and I've set mouse=a in my .vimrc, so upon startup, vim supports mouse cursor. But some times I need to copy text from terminal, so I need to shut down mouse support in vim. I tried ...
Hind Forsum's user avatar
  • 10.1k
15 votes
2 answers
10k views

Replace the :make command with a custom script in vim

I use MacVim as my editor within Xcode. By default Command-B and :make are bound to call 'make' from the command line. As we're using Xcode for building and project configuration, I'd like to ...
Grant Limberg's user avatar
15 votes
6 answers
7k views

Compile Vim 7.3 with +clientserver feature on Mac OS X

How do I compile Vim with the clientserver feature on Mac OS X? I have the vim-7.3.tar.bz2 source I understand that MacVim has this built in, but it only works when the GUI is running. I want to ...
Kit's user avatar
  • 31k
15 votes
5 answers
2k views

How can I upgrade the *console* version of vim on OS X?

I'm sure this is a newbie question, but every time I've compiled/dl'ed a new version of vim for os x, running vim on the command-line opens up the gvim app. I just want to upgrade the console version (...

1
2 3 4 5
12