Questions tagged [vi]

a text editor that runs in a command line interface. Includes other variants such as vim

Filter by
Sorted by
Tagged with
1 vote
2 answers
56 views

Unable to fully uninstall Vim from Monterey

I installed Vim using Homebrew, but I need to uninstall it. I ran brew uninstall vim, but for some reason I'm still able to launch vim from the Terminal. Even after trying to uninstall, vim --version ...
0 votes
1 answer
20 views

Is it possible? Right-Click in Finder folder should launch a vi editor in that folder

I often find myself wanting to use the vi editor (vim) to add a text file in an open finder window (directory). I strongly dislike using TextEdit since it often mangles my text file. Currently I need ...
0 votes
0 answers
9 views

Selecting text with keyboard: Switch sides

When selecting text with e.g. shift + right, shift + left in MacOS, can one "switch sides", i.e. switch so that the selection is presrved, but shift + left and shift + right now move the ...
  • 228
2 votes
2 answers
351 views

Command-C in vim on macOS is not copying even with "+clipboard" flag

Let's take a look at the clipboard flags: vim --version | grep clip +clipboard +keymap +printer +vertsplit +eval -mouse_jsbterm -sun_workshop -...
2 votes
0 answers
79 views

Delete key doesn't work in vim insert mode

I am using vim on a Mac in iterm2 and an external Windows style keyboard. I would like to use the Del key to forward delete like it normally would on a text editor. However, when I press the Del key ...
0 votes
1 answer
717 views

Scrolling issue in vim after switch to iterm2

On my MacBook (Monterey 12.3.1), I recently switched from the standard terminal to iterm2. However, I noticed some strange behavior when using vim in the new terminal. If I scrolled to the top of ...
1 vote
1 answer
202 views

How to make Chinese pinyin keyboard work in vim?

When I am using a Chinese keyboard as input source, I cannot navigate around vim using regular keys. I would like to leave the Chinese keyboard selected, but still be able to use vim as normal when I ...
  • 7,838
0 votes
1 answer
978 views

How do I use homebrew to link MacVim and Vim at the same time?

I have used homebrew to install both Vim and MacVim on my mac. Right now, MacVim is the one that is linked. When I run mvim --version, I get the most recent and installed version that appears. When I ...
0 votes
1 answer
91 views

Repeat key when editing command lines in "set -o vi" mode

I have set the default shell to bash and have set -o vi alias vi=vim set in the ~/.bash_profile. I also have With this configuration - and apparently some additional special sauce my prior laptop ...
0 votes
0 answers
1k views

How to map caps lock key to esc in visual studio code vim extension?

I see a lot of answers to this question that aren't related to mac, and still couldn't quite figure it out on my machine. I previously worked on Ubuntu and migrated to a MacBook. I used the settings ...
  • 141
0 votes
0 answers
357 views

Why can't I execute "bundle exec rake secret"? The error “bad interpreter: No such file or directory” occured

My ruby ​​version is 2.7.3, my mysql version is 8.0.23, my mysql2 version is 0.5.3, my rails version is 5.0.7.2, and my Xcode version is 12.5. I use macOS Big Sur(version 11.4) and the text editor &...
0 votes
1 answer
56 views

Vim — Automatically Doing a Linefeed When Editing a Markdown (.md) File

(MacVim 8.2, Terminal Vim 8.2, MacOS 10.14.6 Mojave) Not sure when this started happening. Whenever I edit a file with a .md extension, Vim immediately does a linefeed after I type certain lines, as ...
  • 283
0 votes
1 answer
336 views

Map left command key to left control key in terminal only?

I'm using neovim to edit code and am needing to create a mapping in which I press the left command key, and neovim (or at least my alacritty terminal) thinks that I am pressing the left control key. I ...
  • 101
1 vote
0 answers
69 views

Vim in Iterm2 closes after compiling Latex file

When I run !pdflatex % in Macvim, the latex file compiles and I am not exited from Macvim. In iterm2, the compilation occurs and them I am taken out of Vim back into the terminal prompt. Any ideas ...
0 votes
0 answers
82 views

Colour no longer working in vim

I've been using vim for as long as I can remember. Never had a problem, until lately. For no reason that I can see, colour has stopped working. First noticed it when editing a Tex file, and I note ...
1 vote
1 answer
152 views

Quickly change the font size in Terminal

I'm looking for a way to perhaps type a command and have the font change by increments of say 5 or 10. Right now Cmd-+ is taking too long if I want to go from a small font to a large font. I'm using ...
  • 331
3 votes
1 answer
474 views

MacVim color scheme has the right color, but vim through Terminal doesn't

I've installed color schemes that seem to be working well with MacVim. When I run Vim using Terminal, however, the colors change and the color scheme doesn't appear to be working anymore. Is there a ...
  • 331
0 votes
1 answer
5k views

I placed Neovim in usr/local/bin but getting permission denied

I'm not sure where to place the Neovim folder (after extracting it). Is the location usr/local/bin correct? I get the following zsh: permission denied: nvim
  • 331
2 votes
1 answer
575 views

Vim frozen and unresponsive on startup

I am using zsh on macOS. When I type vim, it opens, but it is completely frozen: Anything I press on the keyboard does not display or change the window. In order to exit, I have to terminate the ...
18 votes
1 answer
3k views

How could macOS be POSIX compliant without vi?

As macOS is POSIX compliant and Unix certified, why does vi redirects to vim? As I understand, vim is not POSIX compliant. So how did Apple obtained a Unix certification without having vi installed on ...
  • 343
1 vote
0 answers
154 views

Copy/Cut and Paste from VIM inside Terminal

I am able to copy/cut and paste from the terminal using the mac clipboard. However, when I am inside VIM, over SSH, this feature doesn't seem to work. The options are greyed out. Copy Special is ...
0 votes
1 answer
127 views

How to fix menus and windows in macOS 10.14.6 that do not show any items?

I am using a 13-inch MacBook Pro with macOS 10.14.6 (Mojave) installed. I am trying to utilize the Terminal, however, I cannot see any information in the terminal window. For example if I type vim and ...
  • 111
0 votes
1 answer
122 views

how to set afplay as default media player for wma files in mac OS

Hi I am using a vim plugin named eblook which turns vim console into a dictionary. The problem is that the implementation of the plugin is using a default player for WMA file to play the sound file (...
0 votes
1 answer
82 views

Unicode escape is ctrl+[ , why does this work in terminal or vim, but not safari or other parts of OS?

When i'm working in VIM i'll often times use ctrl+[ to exit insert mode. But if i need to press escape in other parts of the OS ctrl+[ does not act the same way as escape. For example if search a ...
  • 39
0 votes
1 answer
307 views

vim ignoring .vimrc syntax highlighting

I had a ~/.vimrc with some basic syntax highlighting that was working fine until I upgraded to Catalina. Running vim -V I see it loads my vimrc but it totally ignores anything in it. If I run :so ~/....
  • 153
2 votes
1 answer
544 views

What was the first version of macOS to ship with the Vim text editor?

Since macOS (originally Mac OS X) is a variant of UNIX, and has been POSIX-certified for a while, I assume it’s always had the vi text editor available. In recent versions, it has come with Vim. Has ...
  • 1,358
2 votes
1 answer
2k views

How to improve into vim of MacOS Mojave the speed of vertical scroll with bottom/up keys?

I transfer the original post from StackOverflow (Original post) to here since this is about Apple specificity. I have a new macbook with Mojave and vim already installed. Unfortunately, even for ...
2 votes
0 answers
98 views

Vim-like clipboard manager with multiple buffers

I am looking to expand the capabilities of my clipboard. I've grown attached to how vim does it; multiple discrete buffers you can 'yank' (copy) text into. I also generally prefer to use the mouse ...
  • 6,441
0 votes
1 answer
30 views

Pass keyboard input to cli after exiting vim

Some irritating thing when doing git commit - what I'd like to type (really fast :)) git commit -a --amend :wq<CR> git push -f My problem is that after :wq<CR> I have to wait until vim ...
10 votes
2 answers
22k views

Make Homebrew installed Vim override system installed one

I have troubling merging several version of vim on my machine. I have successfully installed vim via Homebrew. Here's the output of running brew info vim: vim: stable 8.1.1550 (bottled), HEAD Vi '...
  • 464
0 votes
1 answer
393 views

Safari extension for Google results navigation (↑/k, ↓/j)

Title says it all. I found some posts linking to some private locations (mostly dead). I wonder if there ain't something like that for Safari. Google Chrome has several of them. E.g. Web Search ...
3 votes
1 answer
4k views

How can I edit the default vimrc file? (it's read only, and chown and chmod says 'operation not permitted')

How can I edit the default vimrc file on osx? (sudo chown ... gives Operation not permitted ) In osx vim /usr/share/vim/vimrc is the default vimrc file My username is 'apple' If I try to do vim /...
  • 406
3 votes
0 answers
627 views

Can't scroll using the touch screen on iOS devices within vim

Over the past days I've started to do my day-to-day (development) work on my iPad instead of the MacBook. I have the MacBook Pro always online and available to connect to over ssh but have a problem ...
  • 169
0 votes
1 answer
950 views

unable to setup powerline for vim

I'm new to mac and would like to setup powerline program for terminal and vim. I was able to setup to the bash shell but cannot do it for vim. I can setup for terminal. This is what I've added to ....
5 votes
4 answers
2k views

Vim like navigation keys for Finder

So I use vim all the time, and I've grown use to the navigation keys h, j, k, l, (especially when navigating with NERDTree). Does anyone know if it's possible to implement this motion in macOS Finder....
7 votes
4 answers
6k views

Homebrew Vim with Python support depends on Python 3.7.0, and I have to use 3.6.5

I have to use Python 3.6.5 because of a library I use that keeps showing bugs on 3.7.0 (TensorFlow). I installed Python 3.6.5 using Homebrew as follows: brew install https://raw.githubusercontent....
3 votes
1 answer
843 views

How do you insert literal control chars in vim on Mac?

How do you insert literal control characters in vi on Mac? For example what is the Mac equivalent of Unix ^V^M Windows ^Q^M (in vim) to insert a \r into a substitution string?
  • 2,328
0 votes
1 answer
1k views

E319: Sorry, the command is not available in this version on macvim

While trying to prepare macvim environment to work with clang-format I did: $ vim ~/.vimrc map <C-K> :pyf /usr/local/Cellar/clang-format/2018-04-24/share/clang/clang-format.py<cr> imap &...
  • 673
0 votes
1 answer
692 views

Can we capture a screenshot of vim window using Terminal?

Let's say I have a file called hello.py. # File: ~/hello.py print('Hello') print('Stack Exchange') I would like to get a screencapture of hello.py when opened in vim editor as the ~/hello.png. Need ...
1 vote
0 answers
79 views

Can't see how to run vi having installed it (I want Vi to run Vi not Vim)

I am trying to run Vi (not Vim), because i'm curious about some older commands like :open. I saw this https://www.reddit.com/r/vim/comments/1u0q0b/how_to_install_traditional_vi_not_vim_on_os_x/ it ...
  • 406
2 votes
1 answer
2k views

Cannot type right curly brace in VIM

For some reason, I cannot type right curly braces (}) in VIM. On my German keyboard, the shortcuts are <ALT-8> and <ALT-9> for left and right braces, respectively. These work in all ...
  • 141
2 votes
1 answer
4k views

How to clear selection in OS X Terminal?

Usually in Terminal to delete text you have to sit there for an hour holding the ⌫ Delete. This is particularly annoying since I use vim in the terminal for Text file editing. But anywhere else in ...
  • 77
3 votes
2 answers
5k views

Installation of mac brew vim version 8.1

I'm using brew vim which is currently at version 8.0.1850 but 8.1 has just been released and I'm wondering if there is a way to upgrade to it yet? I've done some digging and can't see an option to do ...
53 votes
4 answers
45k views

How do I enable syntax highlighting in vim on Mac?

How do I enable syntax highlighting in vim on Mac?
4 votes
1 answer
2k views

Is it possible to edit a macOS alias with vim?

I like to use macOS's alias feature to not have to make redundant files. These aliases work great with Chrome and TextEdit. When I open them with vim, however, I get a giant messy file (presumably the ...
0 votes
1 answer
536 views

How to install vim8 without effecting the built-in vim?

How can install vim8 without effecting the built-in vim that comes with a mac? Like with python2 that comes built-in with a mac, I have python3 separate. So, I can call it with vim8. I am using brew. ...
  • 173
1 vote
1 answer
129 views

Remove 'CMD+i' shortcut from Terminal

I am hoping to use CMD+i to replace esc in vim but found that CMD+i is mapped to Show Inspector. How do I remove this so that I can free up this shortcut in vim?
  • 772
1 vote
1 answer
460 views

Mouse scroll and trackpad behaving differently

I am using a dell mouse with my mac. Although in most context scrolling the mouse wheel produces the same effect as swiping down with two fingers, it sometimes happen that the mouse does not work. One ...
  • 365
2 votes
1 answer
8k views

‘Swap file "./.bash_profile.swp" already exists’

I'm trying to edit .bash_profile because I am installing the JDK on my Mac. When trying to open up the file using vi ./.bash_profile, it shows an error because there was a swp file of bash. It also ...
  • 21
0 votes
1 answer
199 views

Found a socket called "chaos_control" in my home directory, what is it?

I did an ls in my home directory and along with my normal folders it listed a file called chaos_control. It does not show up in Finder even when I show hidden files. I ran file chaos_control and it ...