Since these files are owned by the installation package, you'll have to redo this if you reinstall or add a new version as it will overwrite all this. vim/syntax/confluencewiki.vim file correctly, you can now select that syntax type for the current document.
![syntax files for macvim syntax files for macvim](https://miro.medium.com/max/960/1*tp-4uCpQ76JTviqNLk55rw.gif)
It should now show up in the Syntax filetypes listing and presuming you added the. Restart Vim in GUI mode – this applies to MacVim as well. This applies generally to any syntax that isn't bundled with Vim, but if you wanted to add support for the confluencewiki syntax you downloaded from here, the alphabetic-orderingly appropriate space is:Īn 50.20.370 &Syntax.C.Config.Generic\ Config\ file :cal SetSyn("conf")Īn 50.20.380 &Syntax.C.CRM114 :cal SetSyn("crm")Īnd you would add a line with numbering in between so that it now looks like:Īn 50.20.375 &Syntax.C.Confluence :cal SetSyn("confluencewiki") For me it was /Applications/MacVim.app/Contents/Resources/vim/runtime/synmenu.vimįind the in between space where your entry should go (they are incremented by 10s so you have 9 in between spaces). Open the appropriate Vim runtime syntax menu file for editing. You can always set the filetype while you are editing with the commandĪdding Confluence wiki syntax to the Vim gui menu dropdowns The following ~/.vim/filetype.vim entry reads in the first line and regex searches for the word confluence and if found sets syntax type confluencewiki.Īu BufNewFile,BufRead * if getline(1) =~ 'confluence'| setfiletype confluencewiki | endif Instead of having to have all my confluence pages show the word confluence in the rendered version, the hack is to add hidden text to the top of your confluence files that won't show up when you are in viewing mode on confluence but does when you edit. Instead of creating a custom file extension for Vim to recognize, I have it parse the file for the word confluence in the document. To have Vim automatically recognize them I add an entry to ~/.vim/filetype.vim to automatically handle them. Sometimes instead of posting half completed documents back to confluence I save them on my local machine. I prefer to edit my confluence documents in Vim instead of the built-in confluence editor. Making Vim automatically recognize Confluence docs
![syntax files for macvim syntax files for macvim](https://i.stack.imgur.com/hvDjS.png)
2 Adding Confluence wiki syntax to the Vim gui menu dropdowns.
![syntax files for macvim syntax files for macvim](https://user-images.githubusercontent.com/29671981/118379810-d27b4700-b5b3-11eb-9c09-a3a66cd6776e.png)