Has anyone managed to get a custom .vimrc working under Haiku using vim from the depot?
I’ve tried putting
export MYVIMRC=~/.vimrc
In my .profile but Haiku vim doesnt seem to recognise that and the packaged vimrc is read only.
I’m sure I can manually load a vimrc from within vim but that defeats the whole point of an rc file.
Vim is cleany ported so the vimrc file goes in (IIRC):
~/config/settings/vim/.vimrc
The exacpt paths for configuration files are listed in “:help starting”. The Haiku version of vim will include the Haiku specific pathes there (other ports will not as the vim developers never upstreamed our patches).
Hi,
I use vim a lot but I never used vimrc. What kind of useful stuff do you put in it for Haiku?
Thanks!
A lot of things, not much of it being Haiku specific.
My settings file is here: https://github.com/pulkomandy/.dotfiles/blob/master/.vimrc
It enables mouse support, configures automatic indenting to match the Haiku coding guidelines, enables syntax highlighting, set the terminal tab title to the name of the file being edited, sets a better font (for gvim) and colorscheme, configure seqrch to be case sensitive, show results as you type, and highlight matches, shows lines numbers, allows folding of blocks by adding a fold gutter on the left, adds popups for code completion (if you have a ctags file), highlights the 100th (or 80th) column so you see when lines are too long, enable autowrite so :make automatically saves all files before compiling, sets special chars to make tabs and non-breakable space visible, and configure a few vim plugins, the most important being airline (which shows a fancy status line with the current git branch and various other useful informations).
Hi PM
Unfortunately, putting my vimrc at ~/config/settings/vim/.vimrc doesn’t work yet that seems to be the correct path according to :help starting.
Any other suggestions?
I use ~/config/settings/vim/vimrc (without dot) here, and that is working.
Yes, ~/config/settings/vim/vimrc works for me too.
Thanks PM!