diff --git a/sources_non_forked/nerdtree/README.markdown b/sources_non_forked/nerdtree/README.markdown index 9dacf682..4234b54f 100644 --- a/sources_non_forked/nerdtree/README.markdown +++ b/sources_non_forked/nerdtree/README.markdown @@ -87,7 +87,9 @@ A. Stick this in your vimrc __Q. How can I map a specific key or shortcut to open NERDTree?__ -A. Stick this in your vimrc to open NERDTree with `Ctrl+n` (you can set whatever key you want): `map :NERDTreeToggle` +A. Stick this in your vimrc to open NERDTree with `Ctrl+n` (you can set whatever key you want): + +`map :NERDTreeToggle` __Q. How can I close vim if the only window left open is a NERDTree?__ diff --git a/sources_non_forked/nerdtree/lib/nerdtree/path.vim b/sources_non_forked/nerdtree/lib/nerdtree/path.vim index 5de1dfe2..ea6aa032 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/path.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/path.vim @@ -652,25 +652,15 @@ endfunction "Return: the string for this path that is suitable to be used with the :edit "command function! s:Path._strForEdit() - let p = escape(self.str({'format': 'UI'}), self._escChars()) - let cwd = getcwd() . s:Path.Slash() + let p = escape(self.str(), self._escChars()) - "return a relative path if we can - let isRelative = 0 - if nerdtree#runningWindows() - let isRelative = stridx(tolower(p), tolower(cwd)) == 0 - else - let isRelative = stridx(p, cwd) == 0 - endif + "make it relative + let p = fnamemodify(p, ':.') - if isRelative - let p = strpart(p, strlen(cwd)) - - "handle the edge case where the file begins with a + (vim interprets - "the +foo in `:e +foo` as an option to :edit) - if p[0] == "+" - let p = '\' . p - endif + "handle the edge case where the file begins with a + (vim interprets + "the +foo in `:e +foo` as an option to :edit) + if p[0] == "+" + let p = '\' . p endif if p ==# '' diff --git a/sources_non_forked/nerdtree/nerdtree_plugin/fs_menu.vim b/sources_non_forked/nerdtree/nerdtree_plugin/fs_menu.vim index 4e03f35e..e99a85be 100644 --- a/sources_non_forked/nerdtree/nerdtree_plugin/fs_menu.vim +++ b/sources_non_forked/nerdtree/nerdtree_plugin/fs_menu.vim @@ -24,7 +24,7 @@ call NERDTreeAddMenuItem({'text': '(a)dd a childnode', 'shortcut': 'a', 'callbac call NERDTreeAddMenuItem({'text': '(m)ove the current node', 'shortcut': 'm', 'callback': 'NERDTreeMoveNode'}) call NERDTreeAddMenuItem({'text': '(d)elete the current node', 'shortcut': 'd', 'callback': 'NERDTreeDeleteNode'}) -if has("gui_mac") || has("gui_macvim") +if has("gui_mac") || has("gui_macvim") call NERDTreeAddMenuItem({'text': '(r)eveal in Finder the current node', 'shortcut': 'r', 'callback': 'NERDTreeRevealInFinder'}) call NERDTreeAddMenuItem({'text': '(o)pen the current node with system editor', 'shortcut': 'o', 'callback': 'NERDTreeExecuteFile'}) call NERDTreeAddMenuItem({'text': '(q)uicklook the current node', 'shortcut': 'q', 'callback': 'NERDTreeQuickLook'}) @@ -86,10 +86,11 @@ function! s:promptToRenameBuffer(bufnum, msg, newFileName) " 1. ensure that a new buffer is loaded exec "badd " . quotedFileName " 2. ensure that all windows which display the just deleted filename - " display a buffer for a new filename. + " display a buffer for a new filename. let s:originalTabNumber = tabpagenr() let s:originalWindowNumber = winnr() - exec "tabdo windo if winbufnr(0) == " . a:bufnum . " | exec \":e! " . quotedFileName . "\" | endif" + let editStr = g:NERDTreePath.New(a:newFileName).str({'format': 'Edit'}) + exec "tabdo windo if winbufnr(0) == " . a:bufnum . " | exec ':e! " . editStr . "' | endif" exec "tabnext " . s:originalTabNumber exec s:originalWindowNumber . "wincmd w" " 3. We don't need a previous buffer anymore diff --git a/sources_non_forked/syntastic/README.markdown b/sources_non_forked/syntastic/README.markdown index 03a62f56..1f8ede1a 100644 --- a/sources_non_forked/syntastic/README.markdown +++ b/sources_non_forked/syntastic/README.markdown @@ -28,11 +28,11 @@ ## 1\. Introduction -Syntastic is a syntax checking plugin for Vim that runs files through external -syntax checkers and displays any resulting errors to the user. This can be done -on demand, or automatically as files are saved. If syntax errors are detected, -the user is notified and is happy because they didn't have to compile their -code or execute their script to find them. +Syntastic is a syntax checking plugin for [Vim][13] that runs files through +external syntax checkers and displays any resulting errors to the user. This +can be done on demand, or automatically as files are saved. If syntax errors +are detected, the user is notified and is happy because they didn't have to +compile their code or execute their script to find them. At the time of this writing, syntax checking plugins exist for ActionScript, Ada, AppleScript, Arduino, AsciiDoc, ASM, BEMHTML, Bro, Bourne shell, C, @@ -64,16 +64,40 @@ enabled. ## 2\. Installation -Installing syntastic is easy but first you need to have the [pathogen][1] -plugin installed. If you already have [pathogen][1] working then skip -[Step 1](#step1) and go to [Step 2](#step2). + +### 2.1\. Requirements + +Syntastic itself has rather relaxed requirements: it doesn't have any external +dependencies, and it needs a version of [Vim][13] compiled with a few common +features: `autocmd`, `eval`, `file_in_path`, `modify_fname`, `quickfix`, +`reltime`, and `user_commands`. Not all possible combinations of features that +include the ones above make equal sense on all operating systems, but Vim +version 7 or later with the "normal", "big", or "huge" feature sets should be +fine. + +Syntastic should work with any modern plugin managers for Vim, such as +[NeoBundle][14], [Pathogen][1], [Vim-Addon-Manager][15], [Vim-Plug][16], or +[Vundle][17]. Instructions for installing syntastic with [Pathogen][1] are +included below for completeness. + +Last but not least: syntastic doesn't know how to do any syntax checks by +itself. In order to get meaningful results you need to install external +checkers corresponding to the types of files you use. Please consult the +[wiki][3] for a list of supported checkers. + + + +### 2.2\. Installing syntastic with Pathogen + +If you already have [Pathogen][1] working then skip [Step 1](#step1) and go to +[Step 2](#step2). -### 2.1\. Step 1: Install pathogen.vim +#### 2.2.1\. Step 1: Install pathogen.vim -First I'll show you how to install Tim Pope's [pathogen][1] so that it's easy to +First I'll show you how to install Tim Pope's [Pathogen][1] so that it's easy to install syntastic. Do this in your terminal so that you get the `pathogen.vim` file and the directories it needs: ```sh @@ -87,7 +111,7 @@ execute pathogen#infect() -### 2.2\. Step 2: Install syntastic as a pathogen bundle +#### 2.2.2\. Step 2: Install syntastic as a Pathogen bundle You now have pathogen installed and can put syntastic into `~/.vim/bundle` like this: @@ -100,7 +124,8 @@ Quit vim and start it back up to reload it, then type: :Helptags ``` If you get an error when you do this, then you probably didn't install -[pathogen][1] right. Go back to [Step 1](#step1) and make sure you did the following: +[Pathogen][1] right. Go back to [Step 1](#step1) and make sure you did the +following: 1. Created both the `~/.vim/autoload` and `~/.vim/bundle` directories. 2. Added the `call pathogen#infect()` line to your `~/.vimrc` file @@ -328,6 +353,11 @@ a look at [jedi-vim][7], [python-mode][8], or [YouCompleteMe][9]. [10]: http://perldoc.perl.org/perlrun.html#*-c* [11]: https://github.com/scrooloose/syntastic/wiki/Syntax-Checker-Guide [12]: https://github.com/rust-lang/rust/ +[13]: http://www.vim.org/ +[14]: https://github.com/Shougo/neobundle.vim +[15]: https://github.com/MarcWeber/vim-addon-manager +[16]: https://github.com/junegunn/vim-plug/ +[17]: https://github.com/gmarik/Vundle.vim