macvim

Inconsolata Italic in MacVim

孤街浪徒 提交于 2019-12-04 19:59:54
问题 I'm trying to use Inconsolata as my font in MacVim, but I can't seem to find an italic version. I'm using the solarized color scheme, which is supposed to italicize comments, and it works correctly for fonts that have italic or oblique versions in the Font Book. Is there a way to "make" an italic version somehow? Is there some file I haven't been able to find? 回答1: There is a LGC (Latin, Greek, Cyrilic) fork with bold and italic versions. In the download section of the repository you can find

我为什么选择Vim

你说的曾经没有我的故事 提交于 2019-12-04 19:45:16
  总看到一些飞快敲击键盘而不用鼠标的时候你可以很羡慕和佩服,其实这完全没有必要。就像一个吉他手熟练地弹吉他有必要羡慕吗?一个瓦匠熟练地砌砖有必要羡慕吗?这些都是他们赖以生存的工具而已,熟练地运用工具是理所当然的事情。而一个程序员,一个文本编辑者,你如果没有熟练运用你的编辑工具,其实还是挺不应该的,而工具又有优劣之分,选对工具很重要。编辑器有Sublime、Notepad++、EditPlus、Visual Studio Code,以及号称21世纪编辑器的Atom,这些编辑器都很好用,用户基础都很多,而且可以满足日常几乎所有的需求,而vim相对他们一个很突出的特点就是难用,下面Michael Mrozek画的一副比较“写实”的各个编辑器学习曲线图: 作为“编辑器之神”的vim,想驾驭它可不是简单的事情,需要不断地学习然后放弃、再学习、再放弃,说的好像很恐怖,其实我我相信你看这篇文章的时候可能已经放弃了不止一次了吧:D 所以从现在开始你将真正走入vim的神殿,接近并驾驭它。众多的编辑器之中,作为“神之编辑器”——emacs是vim的最强竞争者。两个都很难学,我为啥学vim而不是emacs呢?由于我从vim入门,那时没有听说emacs,也无法体会她真正的魅力,那时的网上也没有这么激烈的争论吧。也许,我从emacs开始,可能就是是emacser了吧。不对,我想,以我的性格

:hardcopy a file in vim with full colorscheme

落爺英雄遲暮 提交于 2019-12-04 13:59:05
问题 I'd like to print some files I edited in MacVIM using full color, including the dark background. Of course I won't send it to printer, I just want to save it in PDF. :hardcopy removes the background and applies an ugly scheme. Is it possible? 回答1: Quoting from :help :hardcopy The current highlighting colors are used in the printout, with the following considerations: 1) The normal background is always rendered as white (i.e. blank paper). 2) White text or the default foreground is rendered as

How to not get special characters in place of meta key combinations for VIM on OS X

依然范特西╮ 提交于 2019-12-04 11:19:49
问题 On OS X, at any program, when I type option-p I get π , option-P I get ∏ and there's a bunch of alt / option bindings that just return greek and other special characters. Is there a way to disable that? Currently I'm using the Auto Pairs VIM plugin and it has the following default mappings: <M-p> : Toggle Autopairs (g:AutoPairsShortcutToggle) <M-e> : Fast Wrap (g:AutoPairsShortcutFastWrap) <M-n> : Jump to next closed pair (g:AutoPairsShortcutJump) <M-b> : BackInsert (g

Skipping a window in VIM with Ctrl-W_W

感情迁移 提交于 2019-12-04 10:02:39
问题 When I have several windows open in VIM, I'd like to always skip one of them (the one containing my project using Aric Blumer's Project plugin), whenever I press Ctrl-W_W. In other words I'd like to cycle through my document windows as if the Project window wasn't one of them. When I actually do want to go into the project window, I'll use the mapping I created especially for this purpose. Is there a way to mark a window so that it's skipped by Ctrl-W_W or would I need a script? I'm loving

Persistent :set syntax for a given filetype?

一曲冷凌霜 提交于 2019-12-04 07:47:08
问题 I'm working on a Symfony2 project which uses Twig, and the filetypes are myfile.html.twig . Vim doesn't automatically detect the syntax highlighting and so applies none. I can use :set syntax=HTML after I've opened the file but this is a pain when jumping between files. Is there a way to persistently set the syntax highlighting for a specific file type in vim? 回答1: You can use autocmd to accomplish that, i.e.: augroup twig_ft au! autocmd BufNewFile,BufRead *.html.twig set syntax=html augroup

How to jump to a specific character in vim?

孤者浪人 提交于 2019-12-04 07:24:56
问题 How can I jump to the next character X in vim? I frequently use, e.g., dt: or ct: to delete/change everything up until a colon (or some other character). Is there any short key combo to simply move my cursor position to that character? 回答1: You can type f<character> to put the cursor on the next character and F<character> for the previous one. 回答2: t and f work without a command as well, so to move to colon use f: and to move to right before colon use t: 回答3: If you do a search for that

MacVim on OSX / Yosemite: no editor windows visible at all

懵懂的女人 提交于 2019-12-04 05:30:52
Installed MacVim on my Yosemite 10.10.2 Macbook Pro today from http://www.macupdate.com/app/mac/25988/macvim The problem is that no editor window(s) are visible. If I open a file using the menu, there's simply no effect: no editor window appears. It's not hidden behind other windows, it's not listed in the Windows menu, it's just entirely undisplayed. Strangely, the file will appear in the MRU list, though. So this renders the entire editor completely useless. Should I just build gvim myself? Is this app actually being maintained by anyone? I'd read some answers which suggest running: brew

Is there a way to list all the default normal, visual and insert mode bindings in vim?

二次信任 提交于 2019-12-04 03:28:28
When you use the :map command without any parameters, it seems that it only lists custom and plugin bindings. Is there a way to view ALL bindings? It would be nice to know if a custom binding would conflict with one of the defaults. Alternatively, is there a decent online reference? There is a list of all of the standard key bindings that you can get by typing :help index . Those are in addition to the custom ones printed out by :map . 来源: https://stackoverflow.com/questions/4778715/is-there-a-way-to-list-all-the-default-normal-visual-and-insert-mode-bindings-i

MacVim: how do I set a left gutter (margin) for my buffers?

落花浮王杯 提交于 2019-12-04 01:53:39
In MacVim the text that I'm editing in all buffers is jammed up hard against the left hand side of the buffer. I find this quite visually jarring, especially if I'm looking at a vertical split. It looks like there is only one pixel between my text and the window border. Is there a setting that will allow me to add, say, a character width as a gutter or margin? I use line numbering for that reason ( :set number ). But if you want a margin without the numbers, use: :set foldcolumn=<width> Example: :set foldcolumn=3 There's also a MacVim-specific option, MMTextInsetLeft , which can be set with