I'm trying to make Notepad++ automatically launch Tortoise's Diff.
With WinExplorer's context menu itens, Tortoise does it nicelly. I use WinMerge to compare and merge files and it's executed. But I can't find a command line way for Tortoise to do the same.
I found http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-automation-idiff.html but it was no use. What I need to do is Tortoise to create a temp file with HEAD copy of the file I wanna compare and execute WinMerge passing these files as parameters.
nvm I got it!
TortoiseProc /command:diff /path:"$(FULL_CURRENT_PATH)"
And I can even create a shortcut to run it :D
Related
So, I enjoy the option of using the up and down arrow keys to search through the command history in Swi-Prolog instead of retyping commands. I want to know how I can delete the command history.
The history is per-directory kept in ~/.swipl-dir-history. The files there are base32 encoded directory names. So, stop Prolog, find the right file, delete it and restart Prolog.
On command line, I could open a directory like:
code .
Now, I want two of the identical diretory opened and displayed in another window.
(It's not spliting the editor)
Then, I tried again.
code .
Nothing happened.
There's still one directory opened.
How to achieve such a task?
You can do this with the following ways:
1- Manually open a new window (ctrlshiftn) and go to:
File > Add folder to Workspace. Then just select the folder.
2- Open the command panel (ctrlshiftp) enter dupl and hit enter that will duplicate the current workspace in a new window
*dupl is just a filter for the complete command that is: Workspaces: Duplicate Workspace in New Window thanks to dipnlink comment
Source: https://code.visualstudio.com/docs/editor/multi-root-workspaces
*Done in windows (10), vscode (1.35.1)
In the latest version, it is actually much simpler.
In a window of the project you want to duplicate, open the command panel (Command + Shift + P in Mac or Ctrl + Shift + P in Ubuntu), then type dupl (and select Workspaces: Duplicate As Workspace in New Window), this will duplicate your workspace in a new window. Now you can have 2 windows of the same project at the same time.
click
file > duplicate workspace
Click Add workspace folder... and open the same folder. Works for me, other solution doesn't work, just jump focus to another window.
As far as I know, the accepted answer is not correct as C14L indicates.
It can be done by opening a different folder that includes the folder you're working in. So say we have /project and /project/src and /project/build, you're probably interested in having src open in two instances of VSCode, which you can achieve by opening /project and /project/src.
In addition to accepted answer, here's the trick if you want to open same project in two different windows but showing two different git branches:
Copy the project folder and open that folder!
If you want two windows in two different git branches then this simple trick works. I don't know of any other solutions.
The accepted answer works, but I don't really like the fact that the folder is opened into an unnamed workspace, and upon closing window, we will be prompted to save that workspace. I am expecting more like Sublime Text like behavior.
Luckily there is VSCodium, VSCode's twin/clone without telemetry to Microsoft. So I ended up opening the folder once in either VSCode or VSCodium, then a second time in the other. This so far worked quite well for me.
I wanted to do this for working in two branches side by side and then I realized it was not possible because you cannot have two active branches in exact same git repo folder.
So, if you are looking to do the same, you should instead just make a copy of a folder and switch to another branch there. Options described in other answers will not work for this scenario due to fundamental way git works.
when i generate .diff file from eclipse using
Java Editor -> Right click -> Team -> Create Patch
I am getting .diff file only displaying the lines of modified changes. I want to generate the .diff file with complete code of that file. Any solution for this?
You have asked in a comment: How to provide external diff?
Install WinMerge as external diff tool.
Then, create .bat file (make sure you pass correct path to WinMerge exe):
start "WinMerge" /B /WAIT "C:\Program Files (x86)\WinMerge\WinMergeU.exe" /e /ub /dl %3 /dr %5 %6 %7
and save it for example at
c:\wm.bat
Then pass .bat file as argument: svn diff --diff-cmd c:\wm.bat
Which will open up WinMerge and show you the differences with complete file code.
More info can be found at this SO link.
I had the same problem (TortoiseSvn on windows) and I solved it by downloading GetGnuWin32.exe and then following the directions in readme.txt to install it. I installed it in
Downloads\GetGnuWin32
directory. Then I opened command window in the folder and added path to diff.exe on the system Path variable as : set PATH=%PATH%;C:\Users\tbudukh\Downloads\GetGnuWin32\gnuwin32\bin.
Then ran the command: svn diff --diff-cmd=diff -x -U999999 > patch.diff
I solved this issue by installing external diff tool called GnuWin32 and configured its path in TortoiseSvn -> Settings. Look for Merge Tool and select the option as external and provide the path of GnuWin32.
Now use the svn command as svn diff --diff-cmd diff -x -U1000 > filename.diff. This will produce diff file with 1000 lines of context. Increase -U value if your file is longer than 1000 lines. now diff file can be uploaded in any code review tool with full context.
I am trying to use mercurial in eclipse. I downloaded mercurial eclipse plugin for this.
But, despite I had reinstalled it many times, it gives the same error, I put the screenshot below.
Checking encoding (cp1254)...
Checking extensions...
Checking templates...
Checking patch...
Checking commit editor...
Can't find editor 'notepad' in PATH
(specify a commit editor in your configuration file)
Checking username...
1 problems detected, please check your install!. Command line: hg -y debuginstall
I do not know how to handle this. Any help will be appreciated very much, thank you.
I encountered the same problem when I tried to run Eclipse x64 on Win 7 x64. The MercurialEclipse seems not able to access C:\windows\system32\ folder, although it has been specified in system PATH.
You need to specify the location of editor in the Mercurial.ini file. This file is located at c:\Users\<your_username>\mercurial.ini.
Under the username = ... line, add a line to specify the editor (see following). Remember not to put quotes around the path.
[ui]
username = <username>
editor = c:\Windows\System32\notepad.exe
(Note: similar to bug 13505 in Mercurial Eclipse project)
The Eclipse inherits the path from your current session.
Open a DOS session, and check if said session does have notepad in its path (which it should considering notepad is in C:\Windows\system32\notepad.exe). Make sure C:\Windows\system32 (or %SystemRoot%\system32) is in first position in your PATH (in case of side effect with other paths with spaces or special characters in it).
If the path is correct, then launch the eclipse from that command-line DOS windows, and see if the problem persists.
The OP emre reports its %PATH% being:
C:\Program Files\NVIDIA Corporation\PhysX\Common;
C:\Program Files\Java\jdk1.6.0_20\bin;
D:\eclipse-java-helios-sr1-win32\eclipse\android-2.2_r0-windows\android-2.2_r0-windows\tools;
C:\Program Files\Java\jdk1.6.0_20\bin
In other word, no %SystemRoot%\system32.
You need to edit the System variables in the Environment variable settings of Windows, and add in the first place in the PATH variable:
%SystemRoot%\system32
Then you can open a new DOS session, launch eclipse from there and ot should work fine.
i had the same problem and searched for hours till i tried to escape the backslash in the path for the editor.
so i edited the mercurial.ini (on my win7) like this:
[ui]
username = <username>
editor = c:\\Windows\\System32\\notepad.exe
and it worked.
Three additions:
It seems that Tortoise HG 3.3 configuration utility added my editor
setting to [tortoisehg] section rather than the [ui] section of
mercurial.ini For Eclipse Mercurial to work, the editor path must also be in
the [ui] section. Otherwise, eclipse will have this error.
using forward slash suitably substitutes for the escaped backslash
On Windows 8.1, notepad easily starts from the command prompt (on
system path) and yet the error above still occurs. In my hands the
general system path advice given above seems off target
One other thing to look at is the HGEDITOR environment variable, which overrides the editor setting in mercurial.ini. I had HGEDITOR set to C:\Windows\System32\notepad.exe, which didn't work (due to the unescaped backslashes), and all my changes to mercurial.ini were ignored. Changing HGEDITOR to C:\\Windows\\System32\\notepad.exe finally got rid of the Mercurial Eclipse errors.
I was an Eclipse user, now I have to use Vim in my machine.
I used to "compare" a file I edited with a CVS repository to do merges an commit the files, using a context menu and my mouse.
Is this possible in Vim? Opening a vimdiff for a file before commiting, and commit it from vim itself?
And how is that supposed to work?
I'm supposing I would be editing a file. Then, I want to see the modifications. I run vimdiff in gvim, and a new window (or buffer) is opened. I run the modifications, save what is applicable (using vimdiff commands), and commit running another command.
Is this all transparent in vim? Do I have to keep getting out of vim to my terminal, or can all be done inside it?
Do I need to use some plugins, or just really simple functions inside my vimrc?
There is a couple plugins to integrate VCS to vim.
I personnally use vcscommand. It does at least the 2 things you're asking for: comparing from repository using vimdiff and commiting from within vim.
I personally just switch between vim and the terminal.
Usually I'd have several console tabs open at the same time (if you're on windows, Console can do that).
It depends on the VCS used, but you can linked that VCS with vimdiff (see git, for instance)
You could also try and integrate directly Vim into your Eclipse session with eclim.
(should you still be using eclipse. If not, I leave the following for others)
It does support the Eclipse local History.