Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Version 8

Fixed so only considers if vim is already running in this user session, to avoid failure when another user is running vim
  • Loading branch information...
commit 74f75a4d28c64429e9bda6daae79e9feba08efc9 1 parent 5c30cda
Geoff Wood authored committed
Showing with 3 additions and 2 deletions.
  1. +1 −1  doc/gvimt_README.txt
  2. +2 −1  gvimt.bat
2  doc/gvimt_README.txt
View
@@ -5,7 +5,7 @@ gw 25/9/12 - Updated to raise Vim to foreground, removes awk and grep dependency
gw 9/10/12 - Goes to normal mode first to make sure commands execute and don't just go into the file. Waits a bit when starting vim. Clears the command from the command line afterwards.
gw 9/5/13 adds tv and ts modes to open groups on new tab
gw 10/5/13 added tabsplit_wait_s to fix problem where opening many files would end up on more than one tab
-
+gw 17/6/13 only look at tasks for this user session when checking if vim is already running
gvimt.bat is a script for Windows to open new files in gvim in new tabs, splits or vertical splits. It starts gvim if it is not running already.
3  gvimt.bat
View
@@ -14,6 +14,7 @@ REM also fixed typo recently introduced where vsplits were just actin
REM gw 8/10/12 get into normal mode first, fixes problem where command appears in file text in insert mode
REM gw 9/5/13 adds tv and ts modes to open groups on new tab
REM gw 10/5/13 added tabsplit_wait_s to fix problem where opening many files would end up on more than one tab
+REM gw 17/6/13 only look at tasks for this user session when checking if vim is already running
setlocal ENABLEDELAYEDEXPANSION
@@ -70,7 +71,7 @@ REM If another instance ran, it made sure
REM gvim was running
REM Otherwise do it now
if %already_ran%==false (
- tasklist | findstr gvim.exe > nul
+ tasklist | findstr %SESSIONNAME% | findstr gvim.exe > nul
if not !errorlevel!==0 (
start %vim_path%gvim.exe -c "let g:gvimt_time_this=localtime()" %1
set already_ran=true
Please sign in to comment.
Something went wrong with that request. Please try again.