delimitMate not working on vim installed with Pathogen - vim

I'm trying to install delimitMate on vim version 7.3. I am using Pathogen. My other pathogen bundles work, so it is not a problem with my setup.
In fact, I've also tried auto-pairs and ClosePairs plugins too, and none of them work. I don't know why? Am I using it wrong? Shouldn't a matching paren simply follow when I put an opening paren (similar to sublime Text?)
The commands :DelimitMateTest and :h delimitemate works, so the script is being executed. It's just not actually autoclosing any parens, and I can't figure out why.
Here's the output file for :DelimitMateTest: http://pastebin.com/2WtHVZJL
Any ideas as to why I can't get paren completion from any plugin?
Thanks!

For those of you who come across this problem in the future:
I had set paste in my .vimrc. This permanently disables several other features, and it was messing up key mappings. Simply remove it from your .vimrc and you should fix your problem.

Related

Does anyone have extra «» generated from lh-brackets

Can't seem to find any reason for this, but I have been using Ycm, syntastic, and all the lh- plugins with vim for a while now. In the case of lh-brackets, I used to have a problem with it generating "«»" every time it 'automatically' generated the other bracket, paren, quote, etc. But it was only happening in .vim files, so i turned it off for vim files in my vimrc. Now nothing has changed, no new scripts installed, and all of the sudden, this happens with ALL files (cpp, h, pl, py, etc). Like i said, not using heavy customization, and everything is default except the disabling of lh-brackets when editing vim files, but that has now become a hotkey since i cant use it anywhere.
My Question is this: does anyone have this or similar problem with lh-brackets, and if so, any idea how to fix it, or is there some setting I am missing?
My first thoughts are to go though and check any updated vim scripts (this just happened a day ago) that could have been updated when doing an apt-get upgrade (like debian.vim) but after that I've got nothing...
The placeholders characters can be jumped to (:h <Plug>MarkersJumpF -> <C-J> with vim, <m-ins> with gvim). That's their purpose.
If you have installed lh-cpp, see :h lh-cpp-first-steps, you'll find a quick guide to my C++ suite (and lh-brackets incidentally).
EDIT: The plugin was badly designed. I've patched the plugin to rely on g:usemarks in order to fix the ergonomic of plugin .
In the (now-) past, if you wanted to set b:usemarks to 0, you'd have needed to add an autocommand that'd set b:usemarks to 0 in all new buffers.
Now, (lh-brackets v2.2.0), if you want to always disable the placeholders/marker characters, you need to set g:usemarks to 0, not b:usemarks. Buffer-local variables are meant to be set from ftplugins, or tree/project-local plugins which are supported thanks to plugins like local_vimrc.
And as romainl has pointed out, don't hesitate to use the bug trackers, or even to contact me.
hmm found it:
:let b:usemarks=0
now needs to be set, apparently that was a marker for integration to another plugin, though i dont use it.

Vim directory with macvim/terminalvim

I am using mac vim in terminal via /Applications/MacVim.app/Contents/vim
By now I didn't really care about what was in the MacVim directory in /Applications/MacVim.app/Contents/Resources/vim/runtime
and still somehow I had proper syntax highlighting etc.. I guess my vim loaded the files from macvim?
Somehow I messed arround with snipmate and all the syntax highlighting stopped to work. Filetypes are correct, but no highlighting. So I copied the syntax folder from the macvim app to my ~/.vim/syntax and it worked like a charm. Is there a way how I can use the ones from the app again?
Thanks for any help
Copying the syntax to your own ~/.vim/ directory effectively forks the factory-defaults. The downside is that you now have to update your copy whenever Macvim is updated.
The key to figuring out the problems is the 'runtimepath' setting. By modifying that (in your ~/.vimrc), you should be able to include the proper runtime files (and that is not just syntax, but also filetype plugins, should you have :filetype plugin on). BTW, it's unlikely this is caused by snipMate.
:set runtimepath?
Also, the :scriptnames command tells you exactly which scripts have been sourced so far.

Syntastic not working with MiniBufExplorer vim plugin

First off I'm a windows user using VIM and vundle to manage my plugins.
I have the Syntastic vim plugin (https://github.com/scrooloose/syntastic) and it works great highlighting any syntax errors for the first javascript file I open and save.
I also have the minibufexplorer plugin (https://github.com/sontek/minibufexpl.vim). Once I open a second file the MiniBufExplorer window appears allowing me to navigate between previously opened files via :b1, :b2, etc. I've noticed when this happens Syntastic stops working.
If I remove the minibufexplorer plugin then Syntastic always works. I'd really like to get both working together, does anyone have a solution for this? I would gladly use an alternative to minibufexplorer if it works with Syntastic.
I'm using pathogen to organize my installed plugins. I have syntastic and minibufexplorer and they work well together for me.
I have done no configuration at all to any of thees plugins. But to handle bufferswitching in an easy way (also works without minibufexplorer) I use this in my .vimrc:
map § :bnext^M
map ½ :bprevious^M
Its the key just below the Esc-key. It makes it very easy to just hit the § key to cycle through all open buffers.
Here is a good place to start your configuration.
Since I'm open to alternatives I will be removing the MiniBufExplorer plugin and using the :ls vim command to view the buffer list when desired. It's not as convenient as using the MiniBufExplorer plugin but I find syntax highlighting more important and am satisfied with this workaround.

How can I enable SCSS snippets for Vim's SnipMate?

I have installed garbas’s snipMate fork and honza’s snippet repository for Vim 7.3. I’m running OS X Lion 10.7.5.
I’m able to get everything working properly, as expected — my problem occurs when trying to add scss.snippets (I have tried to do so both as a plugin and manually into the snippets folder, with the same results). I know my new snippet file is recognized, because I tested it by adding CSS snippets to the newly-created scss.snippets file. I knew this would cause a collision, and it did in fact bring up the collision prompt (as outlined in the snipmate docs).
The specific problem: Typing a trigger and then Tab deletes the trigger and doesn’t return the expanded snippet.
I have tried setting the filetype and also the scope.alias solution proposed in Vim and snipMate (plugin) - adding new snippet won't work and in the docs, but I get the same results. Lastly, I tried eliminating all potential n00b mistakes by trying the above solutions against a clean .vimrc file. Again, I get the same results.
10 million virtual high-fives for anyone who can help me — until then, I’ll be bouncing my head off my desk awaiting my salvation... or perhaps reinstalling TextMate. Thanks in advance.
It's probably the snippets you used are not indented correctly or there's some mistakes in the syntax of those snippets which Snipmate then fails to autocomplete
Try looking at that particular snippets file and see if it's highlighted in some way.
it's just probably a wrong indentation of the source code.
Because i reproduced the problem on my scss.snippets file by reindenting or using improper syntax on the snippet files.
NOTE: the snippets use tabs instead of spaces so be sure to disable expandtab
:set noet or :set noexpandtab
I myself, don't know the reason behind this.

Sourcing Vim with Janus

I am using Vim with Janus and I have snipMate installed to handle various code snippets.
I changed one of these snippets and would like to see the change in my current vim window, without restarting Vim.
I tried sourcing:
~/.vimrc.local
~/.vim/vimrc
~/.vim/gvimrc
to no avail. What am I doing wrong?
OK, I wrote a slightly mean smart ass answer that contained this command lifted from SnipMate's doc:
:exec ReloadAllSnippets()<CR>
which works in the original SnipMate but I thought "What if Janus used the new SnipMate instead?".
Indeed, it's using the new SnipMate where this function has been removed.
I've read somewhere that the new SnipMate is loading snippets lazily so it's possible that reloading your current buffer (:e<CR>) is enough.

Resources