Sourcing Vim with Janus - vim

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.

Related

delimitMate not working on vim installed with Pathogen

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.

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.

Latex and Vim usage

How can I use Latex effectively in VIM?
Is there a way to configure compile errors by highlighting the line in vim?
I have syntax highlight. What are other recommended add-ons? Is a makefile the recommended way to compile a latex file to pdf?
TexWorks lets you open and replace the opened pdf everytime it's recompiled. Is there a plugin to do something similar in vim?
I've just begun playing around with LaTeX-Box. It seems like a good plugin. I, also used VIM-LaTeX for a while, but I didn't really like the key mappings, and it seemed a bit to heavyweight as Jeet described.
I like LaTeX-Box so far because it used latexmk to compile, which is what I was using anyway. Latexmk will sit in the background and watch your .tex file for changes, and then automatically compile for you. And if you use a pdf viewer which refreshed changes (such as evince on Linux) you can see updates every time you change. Adding
let g:LatexBox_latexmk_options = "-pvc -pdfps"
to my .vimrc got latexmk working properly. You also need the latexmk script somewhere on you PATH. The key mapping to start latexmk is the same as Vim-Latex's compile: '\ll' (that's lowercase LL).
I also use SuperTab plugin for completions, which is great. And I took the dictionary files from Vim-LaTeX so I have a ton of auto completion words to use. This dictionary file is: ftplugin/latex-suite/dictionaries/dictionary in the vim-latex files. What I did was copy this file into ~/.vim/dictionaries/ and renamed it 'tex' then I added these lines to my .vimrc file:
set filetype on
au FileType * exec("setlocal dictionary+=".$HOME."/.vim/dictionaries/".expand('<amatch>'))
set complete+=k
Then if I type the beginning of a latex command and hit 'tab' I will get a list of completions. Pretty handy. BTW that 'au' command in the vimrc will also load dictionaries for any other filetypes if you want. A useful trick.
check out vim latex
If you use vim latex put the following in your .vimrc:
let g:Tex_DefaultTargetFormat='pdf'
and it should compile to pdf by default. (I think the default compilation key
is \ll).
You can also check AutomaticLatexPlugin, it has many nice features (see the features list).
Its main point is to compile the document in the background using autocommands, so that you are free from compilation cycle. This works nicely on Linux and MacOs. It contains (extended version of) Latex-Box.
vim-latex is great. But I found it too heavyweight for my tastes. I prefer more of a "Vim with LaTeX compile & view" approach, rather than "A LaTeX IDE with Vim key-bindings". So I rolled my own: 'TeX-PDF: Lightweight "stay-out-of-your-way" TeX-to-PDF development support'.
Also check out: "LaTeX Help : Help for LaTeX in vim.help format" for calling up help of LaTeX from within Vim.
I personally can get by on:
autocmd BufNewFile,BufRead *.tex set makeprg=pdflatex\ %\ &&\ open\ %:r.pdf
where open is Mac OS X specific. Linux users will want a different command to view their compiled file after running make. This works best if you have mapped a key to write and then run make (and you should - once you have single key save and compile, you'll never go back).

Vim: SnipMate Plugin: how i can change a .snippet and update it on the fly?

does anyone know how to edit a dot snippet file and reload into (g)vim without closing and re-open the program? it would be great to do that with this excellent plugin.
greetings
If you have the latest version of snipmate you can use the following command from vim to reload all the snippets :call ReloadAllSnippets() or better you can map it to a key
I am currently on a promoting tour for UltiSnips on StackOverflow. UltiSnips will watch your snippet files for change, so all you have to do is save your .snippets file and the changes are immediately available in Vim. There is also a handy :UltiSnipsEdit command that will open the correct snippets file right away.
A conversion script for snipMate snippets is shipped with UltiSnips, so switching is easy.
Have a look at the following discussion

Resources