How to move all open Notepad++ files in all views into one single view? - windows

The Issue
When you have Chrome browser open, if you have many different "windows" (as in "open in new window" vs "open in new tab") open, as I often do, it is useful to be able to join them all into one single window, leaving each tab intact. I use an extension called JoinTabs and it works great. A different extension, OneTab, merges all tabs into one tab by converting the individual tabs into hyperlinks -- that is not what I'm trying to do.
What I'm asking is if Notepad++ has configuration settings, a keyboard shortcut, or a plugin that will accomplish the same thing. By "the same thing", I mean not 'merging' all open documents into one document, but rather merging multiple documents dispersed across multiple Notepad++ instances (windows) into one windows.
Example
So, to be ultra clear, lets say I had three Notepad++ instances/windows/views open, and lets refer to them as A, B, and C for ease of discussion. A has 10 files open, B has 3 files open, and C has 5 files open. A working solution must move all open file tabs into window A and remove windows B & C, such that window A now will contain all 18 tabs.
Whenever I search for "join", "merge", or "combine" I keep getting text/document operations instead of view/display operations.
Research
When I search for this all I find are a bunch of false positives including stuff about:
Merging files into one
Merging lines
Merging all files in a directory
Using the 'combine' plugin from Heinz
FYI: Though it can be a little ambiguous, I've tried to take the ambiguity out of it by clarifying -- with a clear example -- what I'm asking. The 'combine' plugin doesn't do anything close to what I'm asking, and it can easily be seen if one take the time to read the description on the author website which says:
3 files (1.txt, 2.txt, 3.txt) can be combined to one file
Those are all entirely different than what I'm asking.
We are not after one file ... but rather all files in one window.

Looking at the Notepad++ Plugin Manager, there is an entry called combine:
...and based on the plugin's description, sounds like what you are seeking?
I have never used the combine plugin, so I have no other details.

Related

How can I edit multiple files simultaneously with sublime?

I have many similar files where I want to be able to edit them all at once. Like with multiple cursors on one file but with single cursors on a couple of files. How can I do this?
You could use ctrl + shift + f to bring up the find in files panel and simultaneously update files that contain the same find search term, however it is a blind search/replace function.
A better option would be to use a utility tool like TextCrawler which allows searching in multiple files and replaces them accordingly. It offers a variety of settings to meet almost all your needs in the document and file editing arena https://www.digitalvolcano.co.uk/tcdownloads.html [][1image]
Taken from the Sublime webpage:
Split Editing
Get the most out of your wide screen monitor with split editing support. Edit files side by side, or edit two locations in the one file. You can edit with as many rows and columns as you wish.
Take advantage of multiple monitors by editing with multiple windows, and using multiple splits in each window.
Take a look at the View/Layout menu for split editing options. To open multiple views into the one file, use the File/New View into File menu item.

How to interpret or even control the order of the files opened by MDI applications?

Say a directory contains the following sixteen files:
pos1_conf1_1_OS_1state_lbs.out
pos1_conf1_1_OS_3state_lbs.out
pos1_conf2_1_OS_1state_lbs.out
pos1_conf2_1_OS_3state_lbs.out
pos2_conf1_1_OS_1state_lbs.out
pos2_conf1_1_OS_3state_lbs.out
pos3_conf1_1_OS_1state_lbs.out
pos3_conf1_1_OS_3state_lbs.out
pos4_conf1_1_OS_1state_lbs.out
pos4_conf1_1_OS_3state_lbs.out
pos5_conf1_1_OS_1state_lbs.out
pos5_conf1_1_OS_3state_lbs.out
pos5_conf2_1_OS_1state_lbs.out
pos5_conf2_1_OS_3state_lbs.out
pos6_conf1_1_OS_1state_lbs.out
pos6_conf1_1_OS_3state_lbs.out
If I open them all at once, by "File->Open" or "Drag&Drop", the files are opened in completely random order.
It should be noted that this happens both in commercial software such as ChemDraw and home-made utilities. I am wondering how to interpret or even control this random order of the files opened by MDI applications?
If I recall correctly, the file dialog returns the file with the focus rectangle first, and then the remaining files are in the order in which the dialog displayed them. There is no way for you to change this behaviour so if you don't like it you will have to sort the files.

Are these NotePad++ features available in TextMate?

I'm a NotePad++ user, new to TextMate.
There are some features that I really like in NP++ but couldn't figure out if TextMate support them.
Double click on a variable and have all instances highlighted
View 2 text windows side by side
Drag a file onto another opened Window
For this one, I don't know how to generate a screenshot ;-p. Basically, you can drag a file from Windows Explorer and drop it into NP++ to have it opened.
A lot of long time TextMate users are leaving TextMate land, actually. So, I'm not sure it's the right time to move to TextMate.
Emacs and Vim both do what you want and more. If you can afford the learning curve it's definitely worth it.
As for your question:
View 2 text windows side by side
You can have two or more windows for the same document. Assuming you are in a "project" right-click your file in the drawer and choose Open "foo.ext" in New Window. The two "views" contents are more or less in sync but doing cool things like columnar editing tends to break the syncing.
Due to how Mac OS X manages windows, the new window will probably be too large/too small and/or placed in a less than useful place. I use ShiftIt system wide to manage my windows and in such a case have them the same size side by side.
Double click on a variable and have all instances highlighted
What do you use this for? Is this visual highlight or non-contiguous selection?
Type ctrlw to select the word, then ⌘e to make the word your search term, then ⇧⌘f or Edit > Find > Find in Project… It will show all instances of the search term in another window. You can then "jump" to any occurence and do whatever you want.
If you only want to jump from occurence to occurence, select the word then type ⌘e then ⌘g to jump to the next occurence.
Another way is to type ctrls, a little text field appears at the bottom of your window where you can type a word and see its first occurence selected in real time. Repeatly typing ctrls will cycle through the occurences.
Drag a file onto another opened Window
You can drag & drop a file on TextMate's icon in the Dock. You can also right-click the file and choose Open with TextMate *or Open with…*. If you are in a "project" you can right-click and choose Add Existing Files…. Opening multiple files in TextMate will automatically create a "project" for you.
View 2 text windows side by side
I just tried this and it doesn't seem to recognize this functionality. the only time any sort of "add" icon came up was when I dragged the file into an open document and then released, but that resulted in adding the contents of the file into the document.
I just did a quick google search for "textmate split view" and it still doesn't seem to be supported according to some of the answers i found (one from macromates wiki).
Double click on a variable and have all instances highlighted
This also doesn't seem to be supported. This post suggests using the command + f (find), put the word into find, then command + g to jump to the next instance of that word.
There are definitely some things that can be added to textmate to make it more robust. If you are looking for something similar and are on a windows machine, you should check out e text editor. I loved that editor when I was working on a windows machine - split view is supported, but not sure about the highlighting. One thing that e also beats out textmate is the real time regular expression highlighting.

Three-way-merge - different philosophies?

I've been a user of UltraCompare Pro since it first came out, and I think it's a very full-featured compare and merge tool. However, since I have been looking more closely into DVCS, I found that it handles three-way merges differently than (most?) other tools out there. So I wonder why that is, and whether I'm missing something because of it.
In UltraCompare, there are three merge panels (let's call them base, local and other). All the merge action happens within these panels. In practice, this means that I do my work on the middle pane (local), merging changes from the right (other) or maybe from the common ancestor on the left (base). The middle pane is modified during the session and then saved - and committed as the result of the merge. The fourth pane (Output window) only contains information about the diff result.
(source: ultraedit.com)
In other tools, it appears that the three panes only exist in a read-only state, and that the fourth, bottom pane (output) is the place where all the merging happens. What are the reasons to have an extra merge window? Is it easier to keep track of all the changes? Or is it just like that because everybody has always been doing it this way, so we're copying that behavior? What's your opinion on this?
(source: hginit.com)
I'm not sure whether there exists a best or correct answer, so I haven't yet made this question CW, but I'll defer to your opinion here as well.
Seems straightforward to me, you might very well want to keep an unchanged ‘local’ version visible when you are making your changes.
original local other merged
bar= foo+1 bar= foo+2 bof= foo+2
zot= foo+1
... ... ... ...
print foo print bar print foo+1 print bar??
Both local and other have introduced a new variable bar. Merge the first change to bof/zot, go for a cup of tea, come back and try to merge the print. Wait, what was bar in local? If the original local isn't there, that information's gone, and you're scrabbling about with another text editor to work out what's happened.
This is a contrived example but this sort of thing can easily happen for any set of changes you can't keep all in your head and do in one go. In general, a 3WM always has two variable elements, change A and change B. To reproduce all the information in that, you need four views for all the possible permutations of: 0 (the original), A, B, and AB (the merge).
Project: Merge is a comparison and merge tool I've written for XML. I looked at the standard 4-pane approach and almost instantly discarded it as being a very wasteful way of displaying data. A point amply proven in the screenshots above where nearly all panes are showing exactly the same data multiple times.
I therefore developed a single pane approach for displaying all input files and showing which of them contributes to the output. (Or where the differences are when comparing files.) While I haven't allowed completely free form editing of text (mostly due to how the XML nodes are managed and referenced) some parts of the merge output can be edited more or less as you would in a regular text editor. (My editor keyboard shortcuts closely follow those of Visual Studio as far as navigation is concerned.) Most notably character data, comments, and attribute values. You can also cut and paste XML nodes in their entirety. (But obviously only as text to external applications.)
The following screenshot shows a three-way merge with most changes appearing in the 'left' file, and an unresolved conflict below the selected change:
Personally, I like the free perforce merge tool (p4merge). It also has 4 windows - top middle for the original (before branching), left for destination branch, right for source branch and the bottom part is editable.
I like this better than your option 1, as all 3 original files may have important information that can influence the merge.
There are basically two ways to display differences between two files:
Two panels side by side
One panel
Graphically:
aaa aaa
bbb ···
··· ccc
ddd ddd
and
aaa
-bbb
+ccc
ddd
Some program use the first one (e.g. WinMerge) and some programs allow to choose (e.g. TortoiseMerge or Google Project Hosting). It's probably a matter of taste but I find the second one more intuitive when you want to track changes. However, you need two panels when you want to edit changes.
When doing three-way merges, the different layouts come from this. Ultra compare uses the single panel approach to display changes so you get two panels plus a third panel to edit. Other programs use the two panel approach to display changes so you get three panels plus a fourth one for edits.
Again, I believe it's just a matter of taste.

Fastest way to "jump back" to a file in TextMate?

Often, when I am reading code or debugging, I want the ability to quickly jump around files. I especially want to "go back" to where I was. I know about "Command+T", "Command+Shift+T", and, bookmarks. But, I cannot figure out a way to jump around files quickly.
UPDATE: I do not think I my question was clear enough judging by two answers given. Specifically, I am looking for a way to "jump back" to where I was in a file. I know how to navigate in TextMate (in general). I want to know if TextMate has a "jump back" key binding.
It's subtle.
The command-T thing has the files listed in Most Recently Used order.
So, you can go command-T return to get back to your last file real quick. At first I couldn't find it either.
I don't think there's a go to last edit location as there is in, say, IDEA/RubyMine.
Courtesy of MacroMates.com
2.3 Moving Between Files (With Grace)
When working with projects there are a few ways to move between the open files.
The most straightforward way is by clicking on the file tab you need. This can also be done from the keyboard by pressing ⌘1-9, which will switch to file tab 1-9.
You can also use ⌥⌘← and ⌥⌘→ to select the file tab to the left or right of the current one.
It is possible to re-arrange the file tabs by using the mouse to drag-sort them (click and hold the mouse button on a tab and then drag it to the new location). This should make it possible to arrange them so that keyboard switching is more natural.
One more key is ⌥⌘↑ which cycles through text files with the same base name as the current file. This is mainly useful when working with languages which have an interface file (header) and implementation file (source).
When you want to move to a file which is not open you can use the Go to File… action in the Navigation menu (bound to ⌘T). This opens a window like the one shown below.
Go To File
This window lists all text files in the project sorted by last use, which means pressing return will open (or go to) the last file you worked on. So using it this way makes for easy switching to the most recently used file.
You can enter a filter string to narrow down the number of files shown. This filter string is matched against the filenames as an abbreviation and the files are sorted according to how well they match the given abbreviation. For example in the picture above the filter string is otv and TextMate determines that OakTextView.h is the best match for that (by placing it at the top).
The file I want is OakTextView.mm which ranks as #2. But since I have already corrected it in the past, TextMate has learned that this is the match that should go together with the otv filter string, i.e. it is adaptive and learns from your usage patterns.
If you have a project window open, you can leave frequently-accessed files open (in tabs), and then use ⌘+1-9 to jump to open tabs.

Resources