vim Addon Highlight for OpenFOAM
1 Attachment(s)
Hi all together,
i am working with OpenFOAM and vim for changing all the files. When i work with bash or c++ the nice thing is, that vim highlight the code so i decided to create a vim highlight for the standard openFOAM case files. I am not sure if that is helpful for anybody but i wanna share it with you. Its just a beta version and not an accurate tool. I fixed some bugs but there are still some and i implemented just the standard boundary conditions and solvers. You can give me a feedback and i ll work on a new version for that. you can download it on: www.holzmann-cfd.de on the button "Skripte & Addons" Greetings Tobi |
Hi Tobi.
Tahnks for sharing. your script seems very useful. Unfortunately i wasn't able to get it because i get an error 404 when i try to download it. hope it is not an april's fool joke :D regards Edit: I've been succesfull eliminating the 1.1 in the filename. is it still the latest and gratest version? |
Hi,
thx for the error report. that was not really a april joke :D i uploaded the file but did not rename it to 1.1 - now i ve renamed the file and the download is working. And yes - its still the latest version. Let me know if its useful for you! tobi |
Nice work Tobias! Thanks for this.
I upgraded your install-script a bit, so that it will also work for non-root users of VIm Code:
mkdir -p $HOME/.vim |
hi berhard,
thx for that new code. i update my install file now :) Thx. Tobi PS: the suggestion with cat is very good. I ll write a readme with short information! |
Hi all,
a new version of the vim Addon for OpenFOAM is avaiable on my homepage. Have fun! Tobi |
|
Nice! Thanks for sharing!
Some mod may make it more precise though: Code:
let cnum = 1 Kalle |
sounds very good - i ll implement it next week when I am back on my personal computer :)
thanks good idea >>> Changed <<< :) |
Hi all,
I made some changes during the last half year. Now I ll update for the version 2.2.x and adding new keywords. Have fun. |
Quote:
http://www.holzmann-cfd.de/index.php...im-highlighter |
Hi,
thanks for sharing this, it works perfectly. I have been using highlighting for c++ till now, but this one is much better. Karel |
Hi Karel,
thanks for your feedback. I am going to extend the keywords in my winter holyday. I Keep you posted |
What might help you, is the following command from the $FOAM_SRC directory.
Code:
grep -oh "TypeName(\"[A-Za-z0-9]*\")" -r * | cut -d\" -f2 |
Hello all,
I added new keywords to the vim Extension and also changed the tab size to 4 spaces. At the moment I switch all my repositories from github to the bitbucket server. Therefor you find the latest version here: https://bitbucket.org/shor-ty/vimextensionopenfoam |
Hello all,
I reorganized the file tree in the vim extension. Now you can add things very easy and it looks like the openfoam tree: Code:
. The next days I will check out the colour schemes again to be more flexible. Additionally I added a new check in the install script. Have fun,... |
Out of interest what addon/s do you use for code completion, jumping around the OpenFoam source code, compiling, debugging, etc. in vim?
|
Dear all,
I am happy to let you know that I finished the version 3.0. This contains a lot news. Especially the syntax in the files which looks like that now: Code:
"----------------------------------------------"
Available at bitbucket.org/shor-ty I hope its useful for anybody using vim! Feel free to modify the files and push it to the repository. @Logan: Plugins for C++, Jumping with buffers and ":b# or number" for compiling I think you can do it because you can do everything in vim. I have to look for that. |
Here is what I've been able to sort out in vim to get it to be a complete IDE for OpenFOAM
Syntax Highlighting: At the moment I'm using standard C++ syntax highlighting, but will be trying out Tobi's addon soon. Code completion and jumping to definitions/declarations etc: I was able to get the YouCompleteMe addon for vim (https://github.com/Valloric/YouCompleteMe) to work very nicely with OpenFoam. Compiling: A simple key binding to wmake in vim Code:
nmap <silent> <Leader>mf :!wmake %:p:h<CR> Haven't looked into this yet |
Please notice that my stuff is not for coding.
Its only for the openfoam cases. For completition also use Code:
CTRL-N or P Thanks for the link for code completition. I think its similar to: http://www.vim.org/scripts/script.php?script_id=1520 Maybe this would be very nice to have in the FOAM files too! |
2 Attachment(s)
Hello all,
due to the hint of completion, I insert this feature into the colour scheme. See attached pictures. Have fun. |
Compiling version 3.0
Hi Tobias,
Nice job! I have trouble when compiling on regular bash (Debian Wheezy), see following error: Code:
"-----------------------------------------" Code:
err: please use a 256-color terminal /Stefan |
Extension
Hello,
I'm currently working on making your Synatx-Highlighting Vundle (https://github.com/gmarik/Vundle.vim) / Pathogen compatible and making the colouring less "Forcing" (instead of an own colorscheme I try to remodel it to build on top of regular colorschemes so it can be used with the colorscheme of choice, in my case the infamous solarized (http://ethanschoonover.com/solarized) You can find my cloned work-in-progress-fork currently on Github.com (Had an account there so it was easier for me). I'll try to move it to bitbucket soon so I can contribute my changes more easily back to your original effort. Of course only in case you are interested in the aforementioned changes :). https://github.com/effi/vim-OpenFoam-syntax |
Hi, of course you can merged it with my repo. Feel free to modify it -
|
Hello,
I made a pull-request. There are currently still some shortcomings (described in the pull request), so if you want me to edge them out first I will try to give it a go :).. But I highly recommend not using plugins for vim the old-fashioned way but through one if the great plugin managers. Makes it a lot easier to install, update and makes all plugins portable through the use of git for your .dotfiles :) |
Dear all,
thanks for the messages for bug-reporting and extension (pull requests) I get. The latest and I hope - bug free - version 4.0 is online. Ferdinand did a very good job and now its running without any complications. Thanksgiving to Ferdinand Leinbach https://bitbucket.org/shor-ty/vimextensionopenfoam PS: Dear Stefan, sorry I did not realize your reply. Anyway I hope you get it (: In the latest version everything is working. |
Quote:
Hi Tobi, How to install your plugin using Vundle? |
-> Readme file?
|
in the readme file is only about pathogen
I need vundle is it possible to use vundle for your plugin? |
All times are GMT -4. The time now is 13:45. |