Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [macvim]

Vim modified to run as a native OSX ("Cocoa") application. This is NOT the Vim that's included on OSX by default.

Filter by
Sorted by
Tagged with
36
votes
5answers
9k views

Vim search replace all files in current (project) folder

One of the open questions I have about Vim is if there is a way to perform a search/replace in the current project (bear with me if I use this notion inherited from other editors). For instance, let'...
23
votes
6answers
5k views

What additional features do gVim and/or MacVim offer compared to Vim inside a terminal emulator?

I'm learning Vim by watching screencasts. And I'm wondering, why do a lot of people use gVim or MacVim? From what I can see, the GUI Vim version only have additional features that involves using ...
13
votes
1answer
644 views

Why is MacVim starting differently every other invocation?

I noticed when I sat down to do some work on my MacBook today that at some point recently something had gotten screwed up with respect to my .gvimrc settings: when I launched MacVim, everything seemed ...
10
votes
1answer
3k views

Get the current window/buffer/tabpage in Vimscript

In python, when using the vim module, it is incredibly simple to get the current window/buffer/tabpage: current_win = vim.current.window current_buff = vim.current.buffer current_tabpage = vim....
9
votes
1answer
3k views

Mapping Ctrl with equal sign

I am trying to map my Ctrl and plus sign together. This is what I am trying in my vimrc: nnoremap <C-=> : echo "Hello" <CR> However it seems like the mapping is not being triggered. ...
8
votes
3answers
1k views

How to simply remove braces

One of my friend told me that I can use the trick below to remove a pair of curly brackets. Put the cursor inside the curly bracket pair you want to remove. y i { to yank the text in braces , then v ...
8
votes
1answer
2k views

How to preview the result of markdown file edited in vim?

I use vim to edit latex, but latex is bit too heavy for taking notes casually on daily basis, so I decided to use markdown instead. So, I want to configure vim so that I could view markdown ...
7
votes
1answer
2k views

Mouse wheel scrolling inserts characters

I'm using macvim inside tmux inside iTerm2. Basically I just want to be able to scroll the buffer using the mousewheel. I've set set -g moude-mouse on in my .tmux.conf, and set mouse=a set ttymouse=...
6
votes
1answer
2k views

How do I convert a String to a Number, catching invalid strings?

I am trying to convert a String '1' to a Number (int) 1 in a vimL script. I have used the built-in command str2nr() so far, however I was not able to write this in an elegant and effective way. ...
5
votes
1answer
452 views

How can I disable all mouse functions in MacVim?

Is there a way that I can use the 'mouse' option to disable all mouse functions in MacVim?
5
votes
1answer
146 views

MacVim thinks I have unmatching parentheses, until I place cursor over each parenthesis

I am trying out MacVim for the first time and Vim seems to think I have a surplus of closing parentheses: However, Vim seems to change it's mind. Each highlighted closing parenthesis is no longer ...
5
votes
2answers
204 views

MacVim - doesnt find programs in PATH when running commands using “!”

When I'm using vim in a terminal, it uses the PATH I have set, and I can run programs and scripts located in my ~/bin folder using ! For example :! some_bash_script.sh When I try this in MacVim, it ...
4
votes
1answer
2k views

How to move cursor in a specific column

I know that there is already a method to move the cursor to a particular line in vim like :25 and it moves to line number 25. But can I configure vim to move to 15th column in 25th line say something ...
4
votes
1answer
163 views

Visually selecting a line and then deleting does not copy to black hole register

I would like to not have vim copy items to the default register when I delete or change an item; for that, the following configuration seems to do the job perfectly. However I noticed that the only ...
4
votes
2answers
131 views

Repeating the last move using . (w followed by .)

I read that . is used for repeating the last command in Normal Mode. So if I used the command 2w move forward two words and then press . then I would expect to move two words more however this does ...
4
votes
1answer
183 views

What's the point of :promptfind after all

Not sure if it's an appropriate question. But I just can't help wondering, why would any Vim user find it necessary to invoke a GUI search prompt instead of search using / or ?, why would the designer ...
4
votes
1answer
1k views

how to make vim properly render RTL (Right to Left) languages

I get this on my vim: but the arabic translation is showing all messed up (in reverse orderlike dessem pu) it should instead show like this (this is rendered in source tree:) How to I make this ...
4
votes
1answer
172 views

When using macvim with symlinks, is opening vim just calling mvim -v?

I've installed macvim on OSX 10.11.6 using brew install macvim --with-override-system-vim. This worked fine. I now have some new aliases/symlinks (I'm not too familiar with the differences): . #in ...
4
votes
2answers
715 views

MacVim Text rendering problem when scroll up and down

This could be a rare issue related to individual environment. But it's so annoying that can't help me asking for help. Please have a look at following captured photos which is fine before scrolling ...
4
votes
1answer
1k views

How to write message strings to a file using vim script?

I would like to create two functions, one for sending a message string to Vim's own messaging system and one to dump the message string to a file. Now, I have already progressed in figuring this out ...
4
votes
1answer
363 views

MacVim doesn't redraw screen properly [closed]

Sometimes when I do something like saving, opening another file or another tab, the screen isn't changing states properly. At first I thought it was just my computer being slow, but then I noticed ...
4
votes
0answers
262 views

Encoding issue with filename in MacVim

Question In MacVim I type :tabe jäderberg.txt to open a buffer for that file. The file does not yet exist. My status line displays the file name jäderberg.txt. I do i<C-r>% to put the file name ...
3
votes
2answers
286 views

Where does MacVim send its printed files?

I found out about printing using the :hardcopy command, and on my Mac it opens up the output in a PDF named "0.pdf", then the next printing from that file opens "1.pdf", etc. I can save these files, ...
3
votes
3answers
281 views

Indent line to the right with CMD + ] in insert mode

This is a usual shortcut in other editors: indent the current line to the right with CMD+]. How can achieve this in MacVim without leaving the insert mode?
3
votes
1answer
160 views

How to not close MacVim after the last tab is closed?

Can this be done by editing the .vimrc file? What I need is that after closing all tabs, a new tab is there like notepad++ does.
3
votes
1answer
406 views

How can I force a page break in MacVim's printed output?

I've discovered the :hardcopy command, which is the equivalent of the Command-P command in MacVim. I've also found that it accepts ranges. For instance, in my markdown file, I can split the sections ...
3
votes
2answers
322 views

Vimfiler (a plugin): how to open .doc file using MS Word

I have a question regarding a plugin called Vimfiler. What I want is to open a .doc/.docx file using MS Word from Vimfiler. For this, I added the following call vimfiler#set_execute_file('doc,docx', '...
3
votes
1answer
159 views

Can I retain and restore all the GUI windows and its files on launch on Vim?

I'm currently using the session saving to restore the state when the app (MacVim) is closed. nnoremap <leader>q :mksession! ~/.vim/Session.vim<CR>:wqa<CR> nnoremap <leader>...
3
votes
1answer
754 views

Delay before running vim command?

This is probably just a bandaid for a greater problem, but I had the following code for MacVim (GUI mode) in my .vimrc autocmd GUIEnter * winpos 100 50 The problem is it's not working properly on ...
3
votes
1answer
138 views

How can I drag a file onto MacVim and make it open in a split, not a new tab?

I have MacVim 7.1 (patch level 903). When I drag a file onto it from the Finder, desktop, etc., it opens in a new tab. However, I would prefer that it open in a split. According to :help drag-n-drop, ...
3
votes
2answers
1k views

Using Vim/GVim for slideshow presentation

I came across this video about Vim. I would like to ask how can you create a presentation like in the video which seems to run inside Vim. On some slides there are also real pictures displayed. Check ...
3
votes
1answer
24 views

remap “undo key” to no op

I have a keyboard with an undo key right next to the esc key. I often miss esc, hit undo, which causes the vim process to be stopped. How can I remap the undo key in vim such that it doesn't do ...
3
votes
2answers
1k views

How to use Lua in Vim?

I'm using MacVim snapshot 134 (on Mac OS X 10.9.5), which has support for Lua: $ vim --version | grep lua +dialog_con_gui +lua/dyn +rightleft +writebackup I've got Lua installed and ...
3
votes
1answer
343 views

Why is the cursorline always showing after the cursor moves over a line?

Can anyone can help me, my vim always shows the cursorline, like this: I have set nocursorline in the ~/.vimrc, but it has no effect. vim version is: 7.4.622 vim is run on OSX 10.10.3, how to ...
3
votes
1answer
31 views

Float YCM completion candidate list to make more of entry previews visible?

Using plugin YouCompleteMe, I get useful previews of entries. However, if the cursor is near the end of the line, the list gets out of sight. Screenshots below; the latter with pumwidth=75. (First ...
3
votes
1answer
141 views

Specifying the line on which the cursor should start at

I am working on a project that could really benefit if I can open vim by specifying a line number/ match so that the file would open with the cursor positioned on that line. Is there a way to do that ...
3
votes
0answers
1k views

Collapse all directories in NerdTree by default

I recently restored my computer to a clean install and copied over my dot files. MacVim behaves quite a bit differently than my previous install. One main thing is that NerdTree no longer collapses ...
3
votes
0answers
82 views

Why did MacVim try to connect to Vimium server?

So, I have installed Vimium today, and when I first relaunched MacVim, my Little Snitch showed that it tried to connect to vimium.github.io, which it never did before. Why did it do that and how has ...
2
votes
3answers
2k views

Scrolling down multiple lines with Ctrl+e

I know i can scroll down using ctrl+e and up using control ctrl+y. Any idea how I can scroll multiple lines with ctrl+e ? I am looking for a quick solution for scrolling down in vim ?
2
votes
2answers
190 views

How do I enable Bash keyboard shortcuts while in Insert mode?

I like using the Bash shortcuts while at the command line to move around and edit text. A sample of some commands from the link can be seen below: Ctrl + a Go to the beginning of the line (Home) ...
2
votes
1answer
205 views

Are CTRL+C and <esc> the same?

I tried entering the key sequence <esc>+<n>+i+<some-char>+<esc> and it'll type <some-char> <n> times. But if I'm using a macbook keyboard there is no escape key, ...
2
votes
1answer
61 views

Going back to the [n] last edited position

I read the following on vim tips '`' ('' is a mark specifier): move to the position of the given mark) - mark '.' is the last edited position My question is suppose I have two line Line 1 Line ...
2
votes
1answer
289 views

E334: Menu not found: Window.Minimize

I'm using MacVim installed with brew and everything works pretty fine, but (and there always is a "but") when I launch it as mvim from the terminal, it says Error detected while processing /usr/...
2
votes
1answer
344 views

Cut and copy : Blackhole and default register assignment

I currently have something like this in my vimrc. The reason i have this is because I do not want items to be copied to the default register when I delete or change. "Copy the contents of delete to ...
2
votes
1answer
624 views

Vundle/vim can't see changes in .vimrc

I'm enforcing some strange behaviour of Vundle plugin. Basically, from time to time, i'm not able to install new plugins using :PluginInstall because Vundle can't see the new Plugin entries in my ....
2
votes
1answer
277 views

keyboard shortcuts and MacVim 7.4

I've used fuzzyfinder to change between buffers for a long time (since 2008-2009). I've upgraded MacVim no less than 10 times since I've started using fuzzy finder. I've had this in my .vimrc: ...
2
votes
1answer
53 views

How should I move the cursor when running shell by using :sh?

If I use arrow keys, I will get the text in the above picture.
2
votes
2answers
833 views

Syntax highlighting not working vim-polyglot

So I've installed http://vimawesome.com/plugin/vim-polyglot as per those instructions (it shows up with :ListPlugins ), but it's not highlighting any of my code. I realise that's not a lot to go on, ...
2
votes
1answer
22 views

How to set printexpr on MacVim persistently?

Using MacVim 8.1.1722, if I print a buffer, it opens a PDF in Preview.app. I want to open the PDF in Google Chrome instead. So I changed the file association so open foo.pdf opens Google Chrome not ...
2
votes
1answer
209 views

How do I turn off undercurls in Vim-GUIs?

How do I globally turn off undercurls in Vim-GUIs (GVim & MacVim)?