Przeglądaj źródła

To open a file in a new tab page at the end, use $ instead of 999

Yegappan Lakshmanan 11 lat temu
rodzic
commit
e85b806d5b
1 zmienionych plików z 5 dodań i 3 usunięć
  1. 5 3
      plugin/mru.vim

+ 5 - 3
plugin/mru.vim

@@ -1,8 +1,8 @@
 " File: mru.vim
 " Author: Yegappan Lakshmanan (yegappan AT yahoo DOT com)
 " Version: 3.8.1
-" Last Modified: March 9, 2014
-" Copyright: Copyright (C) 2003-2014 Yegappan Lakshmanan
+" Last Modified: Feb 3, 2015
+" Copyright: Copyright (C) 2003-2015 Yegappan Lakshmanan
 " License:   Permission is hereby granted to use and distribute this code,
 "            with or without modifications, provided that this copyright
 "            notice is copied with it. Like anything else that's free,
@@ -518,7 +518,7 @@ function! s:MRU_Open_File_In_Tab(fname, esc_fname)
 	    exe 'tabnext ' . i
 	else
 	    " Open a new tab as the last tab page
-	    exe '999tabnew ' . a:esc_fname
+	    exe '$tabnew ' . a:esc_fname
 	endif
     endif
 
@@ -705,6 +705,8 @@ function! s:MRU_Open_Window(...)
             exe winnum . 'wincmd w'
         endif
 
+        setlocal modifiable
+
         " Delete the contents of the buffer to the black-hole register
         silent! %delete _
     else