snipmate

How to make a file with .pt extension, with xml syntax highlighting and vim's plugin snipmate load pt.snippets?

∥☆過路亽.° 提交于 2020-01-03 05:49:36
问题 I have the following in my .vimrc : au BufNewFile,BufRead *.pt set filetype=xml This is needed because although I'm editing a file with *.pt extension, it's indeed a valid xml file: setting the filetype like this I can have syntax highlighting. I'm using vim's snipmate plugin, and tried to create pt.snippets to specific needs since these files are Zope Page Templates (ZPT with TAL). Now, I have a problem: I don't want to create these snippets in xml.snippets, since they aren't really generic

Vim: snipMate plug-in does not trigger snippet completion

别来无恙 提交于 2020-01-01 05:12:52
问题 Vim is installed at /usr/share/vim. All snipMate's folders were added to this category in existing folders (after, autoload, plugin, snippets, etc.) accordingly. From the documentation file: For instance, to change the trigger key to CTRL-J, just change this: ino <tab> <c-r>=TriggerSnippet()<cr> snor <tab> <esc>i<right><c-r>=TriggerSnippet()<cr> to this: ino <c-j> <c-r>=TriggerSnippet()<cr> snor <c-j> <esc>i<right><c-r>=TriggerSnippet()<cr> I tried this as well - the same result. When I try

Vim and snipMate (plugin) - adding new snippet won't work

╄→гoц情女王★ 提交于 2019-12-24 02:50:35
问题 I am trying to create a new snippet to my snipMate plugin. I work with some files called (i.e.) myfile.endfile All .endfile files should have the same "snippet" like .html files. So I did cp html.snippet endfile.snippet in my ~/.vim/snippets directory. SnipMate is working with all present snippets, but not with my new created one. Any suggestions for this problem? (Btw: after creating the new .snippet file, I ran :helptags ~/.vim/doc command in an vim instance.) 回答1: It is because Snipmate

Vim html.erb snippets?? snipMate Need a vim tip

孤者浪人 提交于 2019-12-20 10:35:03
问题 When I'm in an html.erb file, I get no snipMate snippets. I would like both HTML and Ruby, or just HTML would be fine, How would I do this? Would I need to write a set of snippets? If so, is there a way of pulling in existing snippets without copying them? Is there a way of telling vim to go into html mode when it sees .html erb? 回答1: Snippets are stored in directory called snippets somewhere in your ~/.vim folder. If you look there, there is usually one file per filetype, there is a c

Vim-snipmate doesn't expand snippet instead it removes the trigger

大城市里の小女人 提交于 2019-12-13 04:42:41
问题 Using Vim-snipmate(garbas vim-snipmate fork) on Windows 7 and Vim 7.3.107 I have the following problem. If I press tab in the indicated position (example in java script): var foo = function() { var fum = 0; for<press-tab-here> }; I end up with this: var foo = function() { var fum = 0; }; I have bound tab and Ctrl-j to snipmate and both generates the same problem. The snippets are found, I can list them and loading snippmate generates no errors. I have the following scripts loaded: mayansmoke

I want to do vim snipMate like TextMate

十年热恋 提交于 2019-12-11 23:39:32
问题 i use vim with snipMate But I find this problem if (true) {|}; in TextMate After pressing Enter key .. Look at the cursor if (true) { | }; in vim After pressing Enter key .. Look at the cursor if (true) { |}; How to Make vim , such as TextMate thanks edit this is my vimrc filetype on " Enable filetype detection filetype indent on " Enable filetype-specific indenting filetype plugin on " Enable filetype-specific plugins " New Tab nnoremap <silent> <C-t> :tabnew<CR> " Next Tab nnoremap <silent>

Entering text in snippet fields uses wrong character when using langmap

时光毁灭记忆、已成空白 提交于 2019-12-11 13:14:56
问题 I am using a custom keymap using langmap option in vimrc. I am trying to use snipmate but I am running into trouble. When I type a word and hit tab it allows me to edit the parameter. The problem is that the first character is the remapped one, while I want it to be the actual key. For instance, I'll type this: for and hit tab to expand the snippet: for (i = 0; i < COUNT; ++i) The i is highlighted which means I can edit it. I type "aaa": for (baa = 0; i < COUNT; ++i) It comes out baa even

Vim-snipMate doesn't expand insted removes the trigger

社会主义新天地 提交于 2019-12-11 10:56:49
问题 I was using snimpmate with vim-snippets plugin, and all fine. Until i tried to remove the vim-snippets and use my custom and only snippets 'ruby.snippets' on '.vim/snippets'. i think the snippets are being loaded just when fire TAB or whatever trigger it just removes the text... and leave blank space. def hello if |TAB| end results in def hello end is the same problem here 回答1: You provide very little information to help you with troubleshooting. Here's one function (from my

How do you uninstall deleted files installed by git clone command?

心不动则不痛 提交于 2019-12-11 07:56:44
问题 I heard about the awesomeness of vim , so naturally I said "vim me up". After, countless Youtube videos and Googling for hours, I was ready to install my pluggins ( so I thought). I was able to install NERDTree thru Pathogen and I was feeling good about myself since I'm new to Mac(OSX 10.9) and coding in general. So, I then proceeded to install the next pluggin Snipmate using instructions from https://github.com/garbas/vim-snipmate % cd ~/.vim/bundle % git clone https://github.com/tomtom/tlib

SnipMate with Pathogen

十年热恋 提交于 2019-12-07 02:36:15
问题 I've just installed pathogen on my ~/.vim and add the new command to run the bundles :call pathogen#infect() I've already add to my ~/.vim/bundle folder vim-surround and NERDtree and everything works great. Nevertheless, when I tried to add garbas SnipMate it didn't work. Could someone help with this issue? Thanks 回答1: I installed snimpmate following this guide with no problem at all John Andersons vim guide $ mkdir ~/.vim/ $ mkdir ~/.vim/{autoload,bundle} $ cd ~/.vim/ $ git init git