macvim

在VIM中使用GDB调试 – 使用pyclewn

会有一股神秘感。 提交于 2019-11-29 04:08:27
:help pyclewn 在前面的文章中介绍了 使用vimgdb在vim中调试程序 ,这种方法允许在终端中的vim,以及图形化的gvim中调试你的程序。不过它的局限也是很明显的:首先,它需要给vim的源代码打补丁并重新编译vim;另外,它只能在Linux下使用,不能在windows上进行gdb调试。 要想在vim中调试,除了使用vimgdb外,还可以使用clewn和pyclewn,这两个工具也是vimgdb的作者提供的,用法基本相同。区别在于,clewn是使用C语言编写的,而pyclewn是使用python语言编写的,具有更好的跨平台能力。本文主要介绍pyclewn工具。 使用pyclewn需要计算机上安装有python 2.4(或以上版本)以及gvim 7.0或以上版本。需注意的是,pyclewn只能与gvim配合使用,它不支持终端中的vim(clewn也是如此) (update 2011/12/27: 在vim 7.3中,最新的pyclew已经支持终端中的vim调试)。另外,gvim在编译时需要使能 netbeans_intg 特性和 autocmd 特性。 如果上面的条件都已经满足,到 http://sourceforge.net/projects/pyclewn/ 下载pyclewn,下载后解压准备安装。安装pyclewn很简单,在我的计算机上

Matchit not working

妖精的绣舞 提交于 2019-11-29 02:27:08
问题 I am using Macvim 7.3 snapshot 57. I can't seem to get matchit to work in any of my files. I press % on an opening tag. It doesn't take me to the closing tag... My vimrc file: " Pathogen settings call pathogen#runtime_append_all_bundles() call pathogen#helptags() set nocompatible set number set ruler set cursorline syntax on " Disable all blinking set guicursor+=a:blinkon0 " Whitespace stuff set nowrap set tabstop=2 set shiftwidth=2 set expandtab set cindent set smartindent set autoindent set

Set python virtualenv in vim

与世无争的帅哥 提交于 2019-11-28 23:29:14
I use vim for coding and for python coding in particular. Often I want to execute the current buffer with python interpreter. (for example to run unittests), usually I do this with :!python % <Enter> This scenatio will work works fine with global python, but I want to run virtualenv python instead. How do I enable virtualenv within vim? Is it possible to switch virtualenv on the runtime? I'm using macvim Here's what I use (sorry the highlighting is screwy). " Function to activate a virtualenv in the embedded interpreter for " omnicomplete and other things like that. function LoadVirtualEnv

MacVim Open File In Existing Window

蹲街弑〆低调 提交于 2019-11-28 16:11:30
Is there a way to set up MacVim to open a new file in the current window in a running MacVim instance? I currently have the MacVim preference "Open new files in a new tab in the current window" set, but ideally I'd just like to open new files the way ":e new_file" works, without the tabs. My main motivation is that I currently use NERDTree and Bufexplorer for my workflow and don't need the tabs at all. I'm also using PeepOpen, which is awesome except it always opens files based on MacVim's preferences, so the best I can do is get it to open in the current MacVim window with a new tab. Update

Highlight all occurrence of a selected word?

十年热恋 提交于 2019-11-28 15:14:08
How can I highlight all occurrence of a selected word in GVim, like in Notepad++? In Normal mode: :set hlsearch Then search for a pattern with the command / in Normal mode, or <Ctrl>o followed by / in Insert mode. * in Normal mode will search for the next occurrence of the word under the cursor. The hlsearch option will highlight all of them if set. # will search for the previous occurrence of the word. To remove the highlight of the previous search: :nohlsearch You might wish to map :nohlsearch<CR> to some convenient key. The * key will highlight all occurrences of the word that is under the

UltiSnips and YouCompleteMe

折月煮酒 提交于 2019-11-28 13:14:31
问题 I have bundles ultisnips and youcompleteme installed on my macvim. The problem is that ultisnips doesn't work because tab is bound by ycm. I tried putting let g:UltiSnipsExpandTrigger = "<s-tab>" so that I can trigger the snippet completion with shift-tab, but it doesn't work for some unknown reason. I could use caps as the trigger, but so far I've found no way to do that. Do any of you use those two add-ons together? What can I do to make shift-tab work? Can you recommend another key to

Autocompletion in Vim

試著忘記壹切 提交于 2019-11-28 13:11:41
问题 After a long "training", I have finally switched to Vim; but I have some trouble with the autocompletion. How can I have a code suggestion while I'm typing? I usually develop PHP, Ruby, HTML, C and CSS. 回答1: You can use a plugin like AutoComplPop to get automatic code completion as you type. 2015 Edit: I personally use YouCompleteMe now. 回答2: Use Ctrl - N to get a list of word suggestions while in insert mode. Type :help i_CTRL-N to see Vim's documentation on this functionality. Here is an

$PATH variable not properly set in gvim/MacVim when it is opened from the finder

风格不统一 提交于 2019-11-28 06:55:04
I am using MacVim (basically gvim for the mac). If I open macvim from the command line then my $PATH variable will be properly set. If I open macvim via point and click with the finder, the $PATH variable will NOT be properly set. Can anyone give me some insight? Note: I know at least part of my path is set in ~/.bashrc , but I am not sure where the rest of it is set. Examples: If I open macvim from the terminal: % gvim basic.tex And then in MacVim I go: :!echo $PATH /opt/local/bin:/opt/local/sbin:/sw/bin:/sw/sbin:/Applications/MacVim.app/Contents/M acOS:/bin:/sbin:/usr/bin:/usr/sbin:/usr

How can I install MacVim on OS X?

做~自己de王妃 提交于 2019-11-27 16:39:47
I am using OS X 10.9.1 (Mavericks). What are the systematic steps to install to Gvim or MacVim in Mac OS? If you write the steps using 1, 2, 3, ..., it would be easy to follow. I must confess that I failed to understand all the instructions provided on MacVim page. Other google-searched webpages do not clarify. E.g. What is $VIMRUNTIME ? What version of vim should I install for my OS? Now somehow I have installed MacVim in my system (Not systematically I believe). I can see that I have a folder /Applications/gvim.app/MacVim.app/ . Now when I open a text file from MacVim, which was already

What is the difference between MacVim and regular Vim?

天大地大妈咪最大 提交于 2019-11-27 16:38:10
I'm reasonably new to OS X, but I'm familiar with Vim from using it in various *nix systems. I've seen many people recommend running MacVim over Vim in the terminal. Can anyone tell me what differences there are between MacVim and regular Vim? romainl MacVim is just Vim. Anything you are used to do in Vim will work exactly the same way in MacVim. MacVim is more integrated in the whole OS than Vim in the Terminal or even GVim in Linux, it follows a lot of Mac OS X's conventions. If you work mainly with GUI apps ( YummyFTP + GitX + Charles , for example) you may prefer MacVim. If you work mainly