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
0
votes
1answer
25 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 ...
0
votes
0answers
18 views

Escape key doesn't work on wireless keyboard for MacBook Pro

I have an Apple Wireless Keyboard (A1314) connected to a MacBook Pro (15,1 with Touch Bar), and the Escape key does not work at all. It works fine on an older Macbook Pro and Mac mini. The Touchbar ...
1
vote
1answer
320 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 '...
0
votes
0answers
26 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 ...
0
votes
0answers
28 views

How to map § to ESC?

I want to map the § on a Macbook with touch bar at the system level. I need this at least for using the esc while using vim (I want to feel the key press). How can I do that?
0
votes
1answer
168 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 /...
1
vote
0answers
92 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, ...
1
vote
0answers
90 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
188 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
2answers
297 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
2k 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
203 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
234 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
127 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
40 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
364 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
1answer
565 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
3k 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 ...
11
votes
2answers
9k views

How do I enable syntax highlighting in vim on Mac?

How do I enable syntax highlighting in vim on Mac?
2
votes
1answer
594 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
295 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
42 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
242 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
2k 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
63 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 ...
2
votes
1answer
398 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
226 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
660 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?
2
votes
1answer
381 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
143 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
52 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 ...
4
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
104 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
1k 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
61 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
1k 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
216 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 ...
11
votes
2answers
19k 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
434 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
947 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 (...
2
votes
1answer
12k 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
1k 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
4k 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
262 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
404 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
731 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 ...
2
votes
1answer
429 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 ...