Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [vi]

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

0
votes
0answers
4 views

vimrc and finding errors in latex document [migrated]

To find errors in a latex document, I open vim on the .log file. Then I type manually /^l\.\|[Ee]rr\|[Ww]ar followed by RETURN This extended regular expression works well. It matches a line starting ...
1
vote
0answers
8 views

How to bind Option-Delete to backward-delete-word in zsh vi mode in tmux and alacritty terminal

I use alacritty and currently, I have these key binding key_bindings: # (macOS only) - { key: N, mods: Command, action: SpawnNewInstance } - { key: F, mods: Command, ...
0
votes
0answers
30 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 ...
0
votes
1answer
62 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 ....
2
votes
1answer
158 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....
4
votes
2answers
999 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
1answer
162 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?
0
votes
1answer
168 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 &...
0
votes
1answer
86 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
0answers
31 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 ...
2
votes
1answer
222 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 ...
1
vote
0answers
79 views

How to enable Home and End keys in vim in macOS Sierra

I want Home and End keys to work inside terminal and vim exactly like they work on linux. After searching a few solutions, I found that setting it to \033[H and \033[F fixes it for terminal command ...
1
vote
1answer
323 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 ...
1
vote
2answers
2k 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 ...
7
votes
2answers
6k views

How do I enable syntax highlighting in vim on Mac?

How do I enable syntax highlighting in vim on Mac?
3
votes
1answer
374 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
1answer
250 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. ...
1
vote
1answer
36 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?
1
vote
1answer
199 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 ...
2
votes
1answer
1k 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 ...
0
votes
1answer
58 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 ...
1
vote
1answer
295 views

Available colors in iTerm / terminal.app

I'm trying to make my own colorscheme in Vim, but are struggling to see the available colors in iTerm. Here are my iTerm-color-settings: Here's how I can use it in Vim (for example using ctermfg=...
1
vote
2answers
194 views

Open a MacVim (gvim) window from MacVim

On Ubuntu/Windows when I have a gvim window open I just type :!gvim filename to open a new window. On OSX this does nothing. I think it may have to do with OSX not liking multiple instances of the ...
4
votes
2answers
582 views

Copying text in vim to the global clipboard

On my linux computer I am able to copy text to the clipboard with the command "+y. How do I do the same on Mac?
1
vote
1answer
327 views

Vim mappings not working in OS X

I have the following lines in my .vimrc for Ubuntu. They insert the current date as a string, and insert my signature at the bottom of the currently open file, respectively: :map <F2> "=...
0
votes
1answer
131 views

How to automatically disable trackpad when I am coding with vim in iTerm2?

As the touchpad is bigger now, when I am coding in vim, my thumbs occasionally touch the trackpad and thus move the cursor to somewhere else, which is extremely annoying. How to disable trackpad ...
4
votes
1answer
49 views

Why is [dos] sometimes in the output of a save in “vim”. such as: “foo.txt [dos] 38L, 193C”?

In certain text files, after doing a save in vim with :w, the output mentions [dos] as such: "foo.txt" [dos] 38L, 193C Why is [dos] displayed? As a simple test, I've created a new file with vim on a ...
5
votes
2answers
2k views

Vim the editor keeps crashing on Sierra

I love using Vim through Terminal.app. Everything was fine until three days ago, when Vim starts to crashing. Each crash happens when I enter a newline('\n') character in the Edit Mode, but not every ...
1
vote
1answer
94 views

Why do I have to use sudo although I'm already a member of wheel?

I like to edit files in my /Library/WebServer/Documents without having to run sudo all the time. So I simply added my username abbood to the wheel group using this command: sudo dseditgroup -o edit -...
2
votes
0answers
967 views

`CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) - failed to create global data` warning in vim

I just installed vim using brew $ brew install vim I am on a ssh connection to a MacOSX desktop. I am heavily using homebrew. As soon as try to delete a character or copy something in vim, I get ...
6
votes
1answer
3k views

How to show italic in vim in iTerm2

The beloved Solarized colour scheme seems to apply an italic face for comments, but when I am using it in vim in iTerm2, it does not. So, everything including comments are displayed in Roman (normal) ...
1
vote
1answer
54 views

Not able to write a file with root

I am trying to write to a vim file, fortran.vim. I gave myself access to root following these guidelines. I also saw this SO post, but the answers did not help. sh-3.2# ls -l fortran.vim -rw-r--r-- ...
1
vote
1answer
991 views

iTerm2 applies strange color to vim's default

When I updated my iTerm2 recently in November (the main release, not nightly-build), colors are rendered strange. Fortunately, I restored old iTerm2 in the trash can, and made a comparison. In each ...
1
vote
1answer
198 views

Macvim can not load custom Powerline fonts when started from tmux session

I have a really strange issue with MacVim + Tmux + Powerline Fonts. I can run MacVim from the dock or terminal and it correctly starts with Powerline fonts. When I start a tmux session, and launch ...
4
votes
1answer
1k views

RBENV managed Rubies: VIM upgrade forcing homebrew to install Ruby

I've recently switched from RVM to RBENV as my Ruby manager under MacOS Sierra. $ rbenv version 2.3.1 (set by /Users/meltemi/.rbenv/version) $ which ruby /Users/meltemi/.rbenv/shims/ruby I've used ...
10
votes
2answers
16k views

How to upgrade system default vim?

Finally, vim 8.0 has been released! However, the pre-installed vim is vim 7.3 on my system(OS X El Capitan), and I want to upgrade it to the newest 8.0 version. So how can I do this without messing ...
0
votes
1answer
409 views

nginx.vim syntax highlighting

Attempting to use a VIM syntax highlighting plugin for editing nginx config files on El Capitan. It doesn't take. It asks that you place these files and add these directores: ~/.vim/syntax/nginx.vim ...
1
vote
2answers
874 views

Can you work with Vim on iPad Mini with an external keyboard?

I'm considering to buy an iPad Mini and use it -- among other things -- for programming using Vim. I would connect via SSH to a Digital Ocean server and start Vim there. I would use an external (...
0
votes
0answers
51 views

How to remove the extra button space when having the terminal in full screen mode?

I just notice that when having the terminal in full screen mode, there is an extra space at the button. (see image) Terminal opened in full screen and vim opened. Another example: shell prompt. ...
2
votes
1answer
10k views

Where is the folder with color schemes used by vim?

I use vi on mac os x at work and on Ubuntu at home. I like the colorscheme vim uses on the mac and I'd like to copy the corresponding file on ubuntu, but I can't find it, since there's no ~/.vim ...
0
votes
2answers
979 views

Copying and pasting between tmux panes containing vim instances over SSH in Terminal.app

I use vim to develop Perl code on a remote Linux box running Debian Jesse. The machine is a virtual machine running in VirtualBox. I use ssh and then issue a vim <file> command to start editing ...
0
votes
1answer
3k views

Partition sharing - messed up with GPT/MBR

First of all, sorry for any English mistakes or print screen in French... I'm Belgian. I've had a lot of problems with an iMac 2009 27", mostly with Mac OS. Strangely, Windows (10) works with little ...
2
votes
1answer
248 views

Vim 7.4 hybrid line numbers not working (installed via Homebrew)

I recently discovered that Vim 7.4 enables a hybrid number mode, such that if you do set nu and set rnu, you'll see the absolute line number of the current line and relative line numbers everywhere ...
1
vote
0answers
381 views

Cannot update 'macvim' formula using Homebrew?

I started my update from a clean output for brew doctor and then brew update macvim does not work: brew upgrade macvim ...
4
votes
1answer
695 views

Is it possible to temporarily remove margin from iTerm2 window?

I just wondering whether its possible to remove the left, right and top margin (or just all margin) temporarily in iTerm2 windows. My goal was to make the vim-airline looks better in iTerm2 by ...
1
vote
1answer
395 views

Setting Terminal tab names in OS X and using vim

I regularly ssh into a Linux cluster from an OS X (El Capitan) Terminal, sometimes with multiple Terminal tabs. I use bash and vim. I'd like to do the following: while ssh'd, set the Terminal tab ...
8
votes
2answers
3k views

Numeric keypad keys in vi insert letters instead of numbers

I'm new to vi. Actually I'm using it just to modify small text files. I've a serious and unusual, I think, problem with the numeric keypad, as follow: I write vi IN and press enter. This make me ...
3
votes
1answer
140 views

Where is POSIX Ex editor on Mac?

Since Ex is a standard Unix editor (standardized by POSIX), I expect to be shipped with OS X, however it's linked into vim instead as shown below: $ stat /usr/bin/ex File: ‘/usr/bin/ex’ -> ‘vim’ ...
1
vote
1answer
188 views

USB Keyboard's number pad doesn't work while using vim

I have a usb keyboard that has a numberpad. When I use the number pad in most situations, it works as expected (IE when I click the bottom 3 buttons, I get 123 in this web form). However, when using ...
1
vote
1answer
766 views

Vim Explorer “not an editor command”

When I open MacVim (installed with homebrew) in the GUI, the Explorer works as expected. But if I open "vim" in a terminal, I've got that message: E492: Not an editor command: Explorer But the netrw ...