macvim

在Mac OS X中将Caps Lock用作Esc

落花浮王杯 提交于 2020-02-26 09:15:09
如何在Mac OS X中使Caps Lock像Esc一样工作? #1楼 我唯一知道的方法是将Caps Lock映射到Control,Option或Command。 这可以通过“系统偏好设置”的“键盘和鼠标”面板来完成。 单击左下角的“修改键”,您将能够将Caps Lock,Control,Option和Command重新映射到其中的任何一个。 @Craig:这表明 可以 将Caps Lock用作普通键(即非切换键)。 在MacBook上,由于我已重新将Caps Lock映射到Control,因此Caps Lock灯永远不会点亮。 它只是像Control键一样。 #2楼 如果您不想安装第三方应用程序,而实际上只在意iTerm中的vim,则可以使用以下方法: 重映射的CapsLock为描述帮助 这里 。 短版:使用plutil或类似文件来编辑 ~/Library/Preferences/ByHost/.GlobalPreferences*.plist ,它应类似于以下内容: <key>HIDKeyboardModifierMappingDst</key> <integer>6</integer> <key>HIDKeyboardModifierMappingSrc</key> <integer>0</integer> 重新开始! 简单的注销和登录对我不起作用。 在iTerm中,为“帮助

How do I increase the spacing of the line number margin in vim?

匆匆过客 提交于 2020-02-18 05:44:10
问题 I have a problem with my colorscheme in vim: (source: tinygrab.com) The line numbers are too close to the code. How I can increase the width of the line numbers' right margin? 回答1: https://github.com/vim/vim/blob/master/src/screen.c#L2220 Looking at the code, it turns to be impossible (without patching the vim, obviously): vim always formats the line numbers to take up the whole available width, leaving just a single space afterwards (the "%*ld " format specifier in the code makes sure of

Is it possible to remap an Ex command in Vim (remap :Ack to :ack)?

爷,独闯天下 提交于 2020-01-24 05:24:26
问题 I use the Vim plugin ack.vim, but I don't understand why the command is :Ack with a capital "A" (a little annoying to hold shift ). Is it possible to remap this to :ack ? 回答1: Built-in commands start with a lowercase character and custom commands start with an uppercase character. Those are the rules. Vim simply won't let you define a custom command starting with a lowercase. If you don't like it, nothing prevents you from creating a normal mode mapping: nnoremap <leader>a :Ack<Space> which

初涉Linux ----------> 打造自己的 Vim IDE

扶醉桌前 提交于 2020-01-19 02:27:12
一. 开篇前言   (图片显示越界的话,请刷新)    装好Ubuntu15.04系统 之后呢,玩了玩 Ubuntu,感觉还是很不错的。比windows快,一开机就可以打开你想要的程序,但是在windows下你要等他启动一些必须项才可以正常启用。感觉 Linux 和 MacOs 有得一比。只是在linux下软件会少很多。   之前写过 一篇博文 是关于Vim的简单使用,也是从零开始去接触和使用Vim,了解了那篇博文里的命令后,就可以使用vim来高效地完成你的编辑工作了,当然,如果需要到格式的控制,使用vim还是不够的,需要到 markdown 了,如果Vim能加上 Markdown 的话,那编辑起来堪称完美了吧,哈哈。   Vim 不仅是“编辑器之神”,而且Vim的插件丰富,完全可以打造成开发环境IDE,接下来就记录一下我的vim,整个过程下来,感觉就像是自己搭建了一个IDE,不错哦。   本博文可以完成的效果包括: (左侧目录,分割窗口,代码补全,C/C++/Java/Python 的编译运行/语法补全/Tagbar[右侧大钢导航])   Vim作为IDE,可以达到的效果,先来解解馋: 二. 本篇博文介绍到的Vim的配置功能 1. 先来安装吧    安装的话,在 Linux 下是很简单的,打开终端,输入几条命令就可以完成了。   sudo apt-get install vim

vim和emacs

[亡魂溺海] 提交于 2020-01-17 15:05:09
vim和emacs 在编程界一直有两大神器的传说。这两大神器一个是emacs,一个是vim。一个是神的编辑器,一个是编辑器之神。 程序员的圈子里面也一直流传着一个段子,说是世界上的程序员分为三种。使用vim的,使用emacs的,以及使用其他的。 为什么vim和emacs能得到如此推崇呢? emacs emacs的封神是因为其高度的可扩展性,你可以用vim打游戏,听歌,画画,上网,收发e-mail,代替tty,甚至控制你们家咖啡机煮咖啡。 emacs基于lisp语言解释器,其强大之处几乎混淆了操作系统和文本编辑器的界限,只要你打开emacs,你就可以呆在里面不用出来了,它可以完成你的几乎所有操作,而且只用键盘的主要部分。 vim vim的封神是因为其定位到极致的设计哲学,vim是一个文本编辑器,它就是一个文本编辑器,当然它也可以扩展出很多的插件,但是基本都是第三方的,vim 官方从始至终的的设计理念就是让编辑高效,高效,高 效,更高效。 vim 的每一个设计都是为了能够把工作效率推到极致。 甚至于现在vim的编辑方式都已经成了一种哲学————vs-code、vs、atom、sublime、intellijidea。。。。。所有的主流ide,甚至圣战的另一方emacs,都提供了vim的输入模式。 因为vim的输入方式实在是太高效了,至少现在

Mac软件

左心房为你撑大大i 提交于 2020-01-15 06:04:57
MacVim Mac开发利器之程序员编辑器MacVim学习总结 http://www.bwscitech.com/a/jishuzixun/javayuyan/2014/0531/28849.html 官网下载 http://www.macupdate.com/app/mac/25988/macvim 把 MacVim.app放到你的 应用程序也就是 /Applications目录下(必须放到应用程序目录下,否则终端调用: mvim 会找不到MacVim的可执行文件) 把 mvim拷贝到 /usr/bin/这个目录下 ($sudo cp -f mvim /usr/bin/)(终端就可以通过 mvim 文件名 来启动MacVim编辑文件了) reader.txt(看完删除) 截图软件snip ( 支持滚动截屏 ) http://jingyan.baidu.com/article/fec4bce2458d03f2618d8b8e.html Photoshop CS6 for Mac 简体中文正式 完美破解版 支持Retina屏 http://www.nowmac.com/soft/design/graphic/Photoshop-CS6.html 保存PS动作: 来源: https://www.cnblogs.com/znios/p/4618146.html

Vim replace all without cursor moving

*爱你&永不变心* 提交于 2020-01-12 06:37:29
问题 In Vim, when I do: :%s/foo/bar/g It will replace all occurrence of 'foo' with 'bar' in the entire document. When it completes, the cursor has moved to the last position where 'foo' was replaced with 'bar'. How do you run :%s/foo/bar/g without the cursor leaving the original position before issuing this command? Is there some option I can set in .vimrc file? 回答1: I just type Ctrl + O after the replace to get back the the previous location. 回答2: When the :substitute command is run, before

vim “modifiable” is off

℡╲_俬逩灬. 提交于 2020-01-11 14:51:15
问题 Trying to create a new file with nerd tree. I hit the a key to create a new file and i get the message: E21: Cannot make changes, 'Modifiable' is off I'm using MacVim and Janus (almost out of the box) 回答1: :set ma which is short for :set modifiable will make a buffer modifiable. And :set noma does the opposite. 回答2: I am not familiar with NerdTree but I guess that by typing a into a nerdtree view, it is interpreted as " I want to append something in the nerdtree buffer", and that buffer is

Vim copy one line and paste it to multiple lines [closed]

孤者浪人 提交于 2020-01-06 14:17:15
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I was sure I knew how to do it but I tried on different machines and it seems I don't know. 1 COPY THIS 2 3 4 HERE 5 HERE So that it becomes 1 COPY THIS 2 3 4 COPY THIS 5 COPY THIS What I tried: Shift-V on line 1 to copy line in visual mode, then go to line 4 visual mode vertical selection on lines 4 and 5. Now p

MacVim, remapping Alt-key as Ctrl-key

你离开我真会死。 提交于 2020-01-05 06:54:31
问题 I am a MacVim user, and I would like to know if it's possible to make the Alt - Option key behave as a Ctrl key. Thanks for your time. 回答1: I couldn't find a way of doing it inside MacVim, but KeyRemap4Macbook did the trick. It is a FANTASTIC piece of software, the documentation is just excellent, I recommend it to everybody in difficult mapping situations. It allows you to customize mappings for each app, in an xml file that you can open from inside the app. It's absolutely poka-yoke. This