ref: 6f9e6b4fb93124a25060f4514fed6fbdee0192ec
parent: 3273cfac93bdfcb47aca7b2cfb464347997ac58c
author: phil9 <[email protected]>
date: Wed Dec 22 13:33:49 EST 2021
switch README to markdown
--- a/README
+++ b/README
@@ -1,14 +1,66 @@
-vim
-====
+# vim
This is a plan9 port of the vim editor.
The port was initially done by stefanha (see https://vmsplice.net/9vim.html).
-New features/Enhancements:
-- plumber support
-- mouse support
+This fork builds on the initial port and brings a couple extra features (plumber, mouse support) but also bug fixes (mainly shell command execution).
-Issues:
-- Commands relying on temporary files (:r, :make, :grep, etc.)
-- Accented characters
-- Backspace key
+## plan9 integration:
+Here are a couple of things I use to help with integration within plan9.
+VIM loads its configuration from `$home/lib/vimrc`.
+
+### mk
+To make `mk` output recognized by `quickfix`, use the following:
+```
+set errorformat+=%tarning:\ %f:%l\ %m
+set errorformat+=%tarning:\ %f:%l[%.%#]\ %m
+set errorformat+=%f:%l\ %m
+set errorformat+=%f:%l[%.%#]\ %m
+autocmd BufReadPost quickfix nnoremap <buffer> <CR> <CR>
+```
+
+### grep
+I use `g` for grepping through code. You can modify the `grepprg` variable to do this:
+```
+set grepprg=g\ $*
+```
+
+### man pages
+The included `man.vim` plugin is modified to work on plan9.
+First you need to load the plugin:
+```
+runtime ftplugin/man.vim
+```
+You can now look at man pages using
+```
+:Man <keyword>
+```
+In addition, you can change the `keywordprg` variable to display man pages when pressing the `K` key over a keyword:
+```
+set keywordprg=:Man
+```
+
+### function signatures
+I use the following function to display the signature of the function under the cursor:
+```
+function! s:Sig()
+ echo system("sig ".expand("<cword>"))
+endfunction
+command! Sig call s:Sig()
+```
+
+### git diff
+I use the following function to display the result of `git/diff` in the current directory as a diff file:
+```
+function! s:GitDiff()
+ 32 new
+ setlocal buftype=nofile
+ :.!git/diff
+ setlocal ft=diff
+endfunction
+command! Gd call s:GitDiff()
+```
+
+## Issues
+- Input is borked (nothing beyong ascii, leader key, etc.)
+- Other things I'm sure
--- /dev/null
+++ b/README.md
@@ -1,0 +1,66 @@
+# vim
+This is a plan9 port of the vim editor.
+The port was initially done by stefanha (see https://vmsplice.net/9vim.html).
+
+This fork builds on the initial port and brings a couple extra features (plumber, mouse support) but also bug fixes (mainly shell command execution).
+
+## plan9 integration:
+Here are a couple of things I use to help with integration within plan9.
+VIM loads its configuration from `$home/lib/vimrc`.
+
+### mk
+To make `mk` output recognized by `quickfix`, use the following:
+```
+set errorformat+=%tarning:\ %f:%l\ %m
+set errorformat+=%tarning:\ %f:%l[%.%#]\ %m
+set errorformat+=%f:%l\ %m
+set errorformat+=%f:%l[%.%#]\ %m
+autocmd BufReadPost quickfix nnoremap <buffer> <CR> <CR>
+```
+
+### grep
+I use `g` for grepping through code. You can modify the `grepprg` variable to do this:
+```
+set grepprg=g\ $*
+```
+
+### man pages
+The included `man.vim` plugin is modified to work on plan9.
+First you need to load the plugin:
+```
+runtime ftplugin/man.vim
+```
+You can now look at man pages using
+```
+:Man <keyword>
+```
+In addition, you can change the `keywordprg` variable to display man pages when pressing the `K` key over a keyword:
+```
+set keywordprg=:Man
+```
+
+### function signatures
+I use the following function to display the signature of the function under the cursor:
+```
+function! s:Sig()
+ echo system("sig ".expand("<cword>"))
+endfunction
+command! Sig call s:Sig()
+```
+
+### git diff
+I use the following function to display the result of `git/diff` in the current directory as a diff file:
+```
+function! s:GitDiff()
+ 32 new
+ setlocal buftype=nofile
+ :.!git/diff
+ setlocal ft=diff
+endfunction
+command! Gd call s:GitDiff()
+```
+
+## Issues
+- Input is borked (nothing beyong ascii, leader key, etc.)
+- Other things I'm sure
+