vim-smartclose : Close Vim windows in a smart way!
| script karma
Downloaded by 115
Comments, bugs, improvements
script versions (upload new version)
|SmartClose is a wise closing utility. What does it mean? SmartClose plugin distinguishes two kinds of windows (the regular windows you use to work) and the auxiliary ones (a preview window, a NERDTree panel, a quickfix window, etc). Basically, the plugin allows you to close a window just with a single keystroke (<F10>). But if there are any auxiliary windows visible, it closes them first (in the LIFO order). It means, you don't have to leave the current (regular) window to close the auxiliary one. Just hit <F10> and you'll get it closed. If there are no auxiliary windows visible, <F10> will close the current window (and a tab if it would be the last window in the tab, or the editor itself, if it would be the last tab).
If you hit <F10> inside an auxiliary window, the window is closed immediately. And sometimes, the same behavior could be desired inside regular windows too, right? Even, if there are visible auxiliary ones, which will have the precedence, as said before. Therefore, the plugin provides you a configurable delay time. By default, during the first second after entering a regular window, hitting <F10> will close that window rather than any auxiliary ones.
In other words, the smart auxiliary windows closing feature is delayed about 1 sec. This way you can move into a regular window you want to close, press <F10> immediately, and close it even if there are open auxilary windows on the screen. The delay can be adjusted or even disabled.
|Place in ~/.vim/plugin/smartclose.vim.
The most recent version can be always found on github: https://github.com/szw/vim-smartclose
Please, don't forget to star the repository if you like (and use) the plugin and rate the plugin here. This will let me know how many users it has and then how to proceed with further development :).
Click on the package to download.
ip used for rating: 184.108.40.206