Przeglądaj źródła

Merge remote-tracking branch 'origin/master' into add_toggle

* origin/master:
  Converted files to Unix format.
  Dr Michael Henry suggested to change all noremap commands to nnoremap. Using noremap is unnecessarily broad and can cause problems, especially for select mode.
  Change "noremap" to "nnoremap" to avoid unexpected mapping modes.

Conflicts:
	doc/bufexplorer.txt
	plugin/bufexplorer.vim
Phil Runninger 11 lat temu
rodzic
commit
54a3417eab
3 zmienionych plików z 26 dodań i 17 usunięć
  1. 1 0
      README.md
  2. 14 7
      doc/bufexplorer.txt
  3. 11 10
      plugin/bufexplorer.vim

+ 1 - 0
README.md

@@ -6,6 +6,7 @@ BufExplorer Plugin for Vim
 With bufexplorer, you can quickly and easily switch between buffers by using the one of the default public interfaces:
 With bufexplorer, you can quickly and easily switch between buffers by using the one of the default public interfaces:
 
 
   '\be' (normal open)  or
   '\be' (normal open)  or
+  '\bt' (toggle open / close)  or
   '\bs' (force horizontal split open)  or
   '\bs' (force horizontal split open)  or
   '\bv' (force vertical split open)
   '\bv' (force vertical split open)
 
 

+ 14 - 7
doc/bufexplorer.txt

@@ -1,7 +1,7 @@
-*bufexplorer.txt*              Buffer Explorer       Last Change: 19 Aug 2014
+*bufexplorer.txt*              Buffer Explorer       Last Change: 03 Nov 2014
 
 
 Buffer Explorer                                *buffer-explorer* *bufexplorer*
 Buffer Explorer                                *buffer-explorer* *bufexplorer*
-                                Version 7.4.4
+                                Version 7.4.6
 
 
 Plugin for easily exploring (or browsing) Vim|:buffers|.
 Plugin for easily exploring (or browsing) Vim|:buffers|.
 
 
@@ -131,10 +131,10 @@ If you do not like the default key mappings of \be, \bs, and \bv, you can
 override bufexplorer's default mappings by setting up something like the
 override bufexplorer's default mappings by setting up something like the
 following in your vimrc file:
 following in your vimrc file:
 
 
-  noremap <silent> <F11> :BufExplorer<CR>
-  noremap <silent> <s-F11> :ToggleBufExplorer<CR>
-  noremap <silent> <m-F11> :BufExplorerHorizontalSplit<CR>
-  noremap <silent> <c-F11> :BufExplorerVerticalSplit<CR>
+  nnoremap <silent> <F11> :BufExplorer<CR>
+  nnoremap <silent> <s-F11> :ToggleBufExplorer<CR>
+  nnoremap <silent> <m-F11> :BufExplorerHorizontalSplit<CR>
+  nnoremap <silent> <c-F11> :BufExplorerVerticalSplit<CR>
 
 
                                                           *g:bufExplorerChgWin*
                                                           *g:bufExplorerChgWin*
 If set, bufexplorer will bring up the selected buffer in the window specified
 If set, bufexplorer will bring up the selected buffer in the window specified
@@ -253,6 +253,13 @@ The default is 0, so that the size is set by Vim.
 ===============================================================================
 ===============================================================================
 CHANGE LOG                                              *bufexplorer-changelog*
 CHANGE LOG                                              *bufexplorer-changelog*
 
 
+7.4.6    November 03, 2014
+    - Not sure how, but the file format was converted to Dos instead of Unix.
+      I converted the file back to Unix.
+7.4.5    October 24, 2014
+    - Dr Michael Henry suggested to change all noremap commands to nnoremap.
+      Using noremap is unnecessarily broad and can cause problems, especially
+      for select mode.
 7.4.4    August 19, 2014
 7.4.4    August 19, 2014
     - Revert change where bufexplorer windows was closed even if the target
     - Revert change where bufexplorer windows was closed even if the target
       buffer has not been loaded yet.
       buffer has not been loaded yet.
@@ -444,7 +451,7 @@ CHANGE LOG                                              *bufexplorer-changelog*
 
 
       But the worse thing is, when I want to save the current buffer and
       But the worse thing is, when I want to save the current buffer and
       type ':w', I get another error message:
       type ':w', I get another error message:
-      E382: Cannot write, 'buftype' option is set 
+      E382: Cannot write, 'buftype' option is set
       --------8<--------
       --------8<--------
 
 
 7.0.15   April 27, 2007
 7.0.15   April 27, 2007

+ 11 - 10
plugin/bufexplorer.vim

@@ -36,7 +36,7 @@
 " Name Of File: bufexplorer.vim
 " Name Of File: bufexplorer.vim
 "  Description: Buffer Explorer Vim Plugin
 "  Description: Buffer Explorer Vim Plugin
 "   Maintainer: Jeff Lanzarotta (delux256-vim at yahoo dot com)
 "   Maintainer: Jeff Lanzarotta (delux256-vim at yahoo dot com)
-" Last Changed: Tuesday, 19 August 2014
+" Last Changed: Monday, 03 November 2014
 "      Version: See g:bufexplorer_version for version number.
 "      Version: See g:bufexplorer_version for version number.
 "        Usage: This file should reside in the plugin directory and be
 "        Usage: This file should reside in the plugin directory and be
 "               automatically sourced.
 "               automatically sourced.
@@ -51,10 +51,10 @@
 "               Or you can override the defaults and define your own mapping
 "               Or you can override the defaults and define your own mapping
 "               in your vimrc file, for example:
 "               in your vimrc file, for example:
 "
 "
-"                   noremap <silent> <F11> :BufExplorer<CR>
-"                   noremap <silent> <s-F11> :ToggleBufExplorer<CR>
-"                   noremap <silent> <m-F11> :BufExplorerHorizontalSplit<CR>
-"                   noremap <silent> <c-F11> :BufExplorerVerticalSplit<CR>
+"                   nnoremap <silent> <F11> :BufExplorer<CR>
+"                   nnoremap <silent> <s-F11> :ToggleBufExplorer<CR>
+"                   nnoremap <silent> <m-F11> :BufExplorerHorizontalSplit<CR>
+"                   nnoremap <silent> <c-F11> :BufExplorerVerticalSplit<CR>
 "
 "
 "               Or you can use
 "               Or you can use
 "
 "
@@ -75,7 +75,7 @@ endif
 "2}}}
 "2}}}
 
 
 " Version number
 " Version number
-let g:bufexplorer_version = "7.4.4"
+let g:bufexplorer_version = "7.4.6"
 
 
 " Check for Vim version {{{2
 " Check for Vim version {{{2
 if v:version < 700
 if v:version < 700
@@ -915,6 +915,7 @@ endfunction
 function! s:Close()
 function! s:Close()
     " Get only the listed buffers.
     " Get only the listed buffers.
     let listed = filter(copy(s:MRUList), "buflisted(v:val)")
     let listed = filter(copy(s:MRUList), "buflisted(v:val)")
+
     " If we needed to split the main window, close the split one.
     " If we needed to split the main window, close the split one.
     if s:splitMode != "" && bufwinnr(s:originBuffer) != -1
     if s:splitMode != "" && bufwinnr(s:originBuffer) != -1
         execute "wincmd c"
         execute "wincmd c"
@@ -1214,19 +1215,19 @@ call s:Set("g:bufExplorerSplitHorzSize", 0)             " Height for a horizonta
 
 
 " Default key mapping {{{1
 " Default key mapping {{{1
 if !hasmapto('BufExplorer') && g:bufExplorerDisableDefaultKeyMapping == 0
 if !hasmapto('BufExplorer') && g:bufExplorerDisableDefaultKeyMapping == 0
-    noremap <script> <silent> <unique> <Leader>be :BufExplorer<CR>
+    nnoremap <script> <silent> <unique> <Leader>be :BufExplorer<CR>
 endif
 endif
 
 
 if !hasmapto('BufExplorer') && g:bufExplorerDisableDefaultKeyMapping == 0
 if !hasmapto('BufExplorer') && g:bufExplorerDisableDefaultKeyMapping == 0
-    noremap <script> <silent> <unique> <Leader>bt :ToggleBufExplorer<CR>
+    nnoremap <script> <silent> <unique> <Leader>bt :ToggleBufExplorer<CR>
 endif
 endif
 
 
 if !hasmapto('BufExplorerHorizontalSplit') && g:bufExplorerDisableDefaultKeyMapping == 0
 if !hasmapto('BufExplorerHorizontalSplit') && g:bufExplorerDisableDefaultKeyMapping == 0
-    noremap <script> <silent> <unique> <Leader>bs :BufExplorerHorizontalSplit<CR>
+    nnoremap <script> <silent> <unique> <Leader>bs :BufExplorerHorizontalSplit<CR>
 endif
 endif
 
 
 if !hasmapto('BufExplorerVerticalSplit') && g:bufExplorerDisableDefaultKeyMapping == 0
 if !hasmapto('BufExplorerVerticalSplit') && g:bufExplorerDisableDefaultKeyMapping == 0
-    noremap <script> <silent> <unique> <Leader>bv :BufExplorerVerticalSplit<CR>
+    nnoremap <script> <silent> <unique> <Leader>bv :BufExplorerVerticalSplit<CR>
 endif
 endif
 
 
 " vim:ft=vim foldmethod=marker sw=4
 " vim:ft=vim foldmethod=marker sw=4