Commit Graph

9 Commits

Author SHA1 Message Date
Noah Frederick
091ef2fbe4 man.vim: prefer cmd-line to normal-mode commands 2016-03-05 09:12:54 -05:00
Noah Frederick
42e710eacb man.vim: clean up regex/string comparisons
- Explicitly specify case sensitivity when comparing strings
- Clean up unnecessarily complex `if` statements
2016-03-05 09:12:54 -05:00
Noah Frederick
9fb9d2929f man.vim: fixes to argument handling and parsing
- Define a collection of legal characters when parsing page and section
  in `s:parse_page_and_section()` instead of relying on 'iskeyword',
  which is unreliable.
- Allow non-numeric section names (e.g., `3c`).
- Simplify argument handling in `man#get_page()` to accommodate
  non-numeric section names.

Fixes #4165.
2016-03-05 09:12:54 -05:00
George Brown
948361760c Respect $MANWIDTH
If $MANWIDTH is set do not override it otherwise use winwidth.
2016-02-01 00:39:24 -06:00
Justin M. Keyes
af0ca25ba9 man.vim: avoid creating extra blank buffers. 2015-09-25 22:01:03 -04:00
Justin M. Keyes
2169721b94 man.vim: accept [count] for section number. 2015-09-23 00:06:27 -04:00
Justin M. Keyes
3c32ae2ff3 man.vim: window-local options
Set window-local options only on a newly-created "man" tab or if we're
already in one.
2015-09-23 00:06:27 -04:00
Justin M. Keyes
45724e2c41 man.vim: man#get_page(): parse page and section.
- Eliminate man#pre_get_page().
- Temporarily remove () from 'iskeyword' to avoid spurious \k match.
2015-09-23 00:06:26 -04:00
Justin M. Keyes
4fb75d61c2 man.vim: convert ftplugin to actual plugin.
- do not create leader maps
- :norm! instead of :norm
- :keepjumps during layout
- use blackhole reg to avoid polluting unnamed reg
- format buffer name as "man://foo(2)"
- simulate behavior of `man`
    - buffer-local mapping of q to quit
    - open in new tab instead of new window
    - set 'nolist'
    - set tabstop=8
2015-09-23 00:05:33 -04:00