*qnamebuf.txt* QuickNameBuf: A quick buffer manager Author: Matt Spear QuickNameBuf version 0.06 ============================================================================== 1. Overview~ *qnamebuf-overview* I really like qname (vimscript #2317) and qbuf (vimscript #1910) and decided that it would be nice to combine them. The author recommended I upload under my name. ============================================================================== 2. Installation ~ *qnamebuf-installation* Extract the downloaded file in your personal |vimfiles| directory (~/.vim under Unix or %HOMEPATH%\vimfiles under Windows). Restart Vim and execute: > helptags ~/.vim/doc < ============================================================================== 2. Usage ~ *qnamebuf-usage* opens a list of the current buffers, and typing a string filters the list (by default ala lustyexplorer vimscript #1890). All filtering is case insensitive (even if using Regular Expressions). If there are many files open goes to a simplified view (just relative buffer number, and the filename with path), when filtered enough shows more information: 1) Relative Buffer Number 2) Current Buffer (%), Alternative Buffer (#), or if it is open in a visible split (=) 3) File name 4) Buffer number 5) Relative file path Beyond the keybindinfs of |qnamepicker.txt| qnamefile provides: Toggle between listed and unlisted buffers Delete the selected buffer, the explorer stays open and retains cursor position Close the window containing the buffer or or Close the buffer explorer Open the selected file in a split window Open the selected file in a vert split window Open the selected file in a new tab ============================================================================== 3. Customization ~ *qnamebuf-customization* |g:qnamebuf_hotkey| Set the default key to toggle qnamebuf (defaults to ). > nmap :call QNameBufInit(REGEXP, [SIZE], [FILE_NAME_ONLY], [ALLOW_LEADER]):~ < If REGEXP is true use regular expressions instead of the lusty filter. SIZE controls the size of the popup. Defaults to 1/2 of the visible lines (|&lines|/2). If FILE_NAME_ONLY is false then use the path and filename otherwise just use the filename. Defaults to true. If ALLOW_LEADER is true then X can be used instead of in the list above. Defaults to false. |g:qnamebuf_unlisted| If set will start in unlisted mode instead of the default (listed mode). ============================================================================== 4. Hints ~ *qnamebuf-hints* I find the following mappings very useful (jump to the ith file): nmap :brewind nmap :brewind \| 1bn nmap :brewind \| 2bn nmap :brewind \| 3bn nmap :brewind \| 4bn nmap :brewind \| 5bn nmap :brewind \| 6bn nmap :brewind \| 7bn nmap :brewind \| 8bn nmap :brewind \| 9bn When starting qnamebuf the relative numbers are displayed and this allows consistent access. ============================================================================== 6. History~ *qnamebuf-history* Version 0.07 - Refactored to have a generic core and many wrappers - Increased speed by changing from a custom function for matching to a regular expression (achieves the same result, but is significantly faster) Version 0.06 - Fixed a bug when switching between listed and unlisted Version 0.05 - Fixed a bug which would cause operations to fail when filtered Version 0.04 - Save and restore register |@y| instead of overwriting it - Made the |cmap|s Version 0.03 - Mistake in always defining the mapping even if a map to QNameInit exists Version 0.02 - Added support for X as a synonym for for |guioptions|+=m users - Some minor code cleanup Version 0.01 - Initial release ============================================================================== 7. Thanks~ *qnamebuf-thanks* - Vim Devs for vim - Stefano for finding that doesn't work with the menu shown and an initial documentation - Peter for a patch for fixing |@y| being overwritten and pointing out the cmap noisiness - pal nart For the amazing qname and qbuf which were the inspiration and basis for this ============================================================================== 8. Contact ~ *qnamebuf-contact* If you have questions, bug reports, suggestions, etc. the author can be contacted at batman900 AT gmail DOT com. The latest version is available at http://www.vim.org/scripts/script.php?script_id=3217. If you like the script please vote for it on www.vim.org. ============================================================================== License ~ This software is licensed under the MIT license. vim:tw=78:fo=tcq2:isk=!-~,^*,^\|,^\":ts=8:ft=help:norl: