Suppose I have some files in a folder. I browse the folder using vim vim myfolder. It lists the files, now I want to know how I can select two files and then open them in comparison mode (two tabs, ...)
When you opened the folder using vim, vim thefolder
navigate to each file using arrow keys and press mf, it marks the files,
then press md, it calls vimdiff on the selected files (up
to 3 files).
Related
I am familiar with sublime text's Ctrl+P to navigate between files, but is there any command or plugin to navigate between folders (Highlight them in the sidebar) and perform actions on them there?
The shortcut for moving to the sidebar nav is Ctrl+0.
Ctrl+1 will bring you back to the file you're editing.
You can use Project ⇢ Add Folder To Project... from the menu or you can bind the command to a key to use it more easily.
The command for this action is prompt_add_folder.
When you add the folder you want to your project you can do actions on folders like New Folder , New File, Remove Folder from Project and other commands depending on other plugins you may have installed.
I'm using Visual Studio Code for working and I use ctrl-P command to search for files in my directory.
The problem appears when I want to search for another file, it opens it in the place of the first searched file, closing it.
Is any setting for avoiding this pain?
By default, VSCode opens files in preview mode. This is indicated by their name being italic in the menu bar. As John noted, you can double click on the file to fully open it.
To disable this behavior, try setting:
"workbench.editor.enablePreview": false
When you select a file from search result -> you will see the file open with file name italicized. This means that the file is open in preview mode. Now any other file you choose to select will replace its content in this tab.
To make this tab stick among the open tabs you can:
double click to select the file
or
double click on already selected file in search pane -> you will see the name of file is not italicized anymore(meaning the file is now pinned as a tab)
Alternatively,
You can use the below setting to have all selected files open as a separate tab:
"workbench.editor.enablePreview": false
This setting is found here : Files -> Preferences-> Settings
But the downside of using this is that all files you click on will remain opened and you would then need to clean tabs after your search.
Ctrl+P -- For targetting a file
Alt+Enter -- For Opening that file into next tab
Double click on the files instead of a single click. That worked for me.
I am curently converting my app source from an entirely different tool to Swift tarrgeting ios7 and newer. I now have an xcode project setup for multiple targets (some source, multiple apps) where each app has its own ".xcassets* file like this:
customerapp1_AppIcon
customerapp1_LaunchImage
And then also:
customerapp1_DataSet (.xml data files and some images)
customerapp1_DataSet_Folder1 (images)
customerapp1_DataSet_Folder2 (images)
The idea is hat the app at startup will use these files (if it finds newer ones online, it will download them to cache and use those instead)
However, researching this further, I now have some doubts:
1) Is this an incorrect use of xcassets if my goals is to have a way to include different files depending on target?
2) How do I load files found in "customerapp1_Data_Folder1" (and what if I e.g. have an image file with the same filename in two folders?)
3) If above is incorrect use - would a solution be to zip all my own data + image files + foldes into a single .zip file. Store that single file in "customerapp1_Data" and then unzip into cache directory at first startup? (That way, my own data structure would also be kept)
The correct thing is to:
Select app project root in acode - build phaes - copy bundle resources
Add folder using "add folder references"
Select the appropriate target for the bundle files
Is it possible to open multiple folders in the same window using Sublime Text 2?
Selecting File->Open Folder always opens the folder in a new window.
Sublime Text is an excellent editor, but this issue is a bit annoying.
You can use the Add folder to Project... item on the Project menu to open a folder in the current Sublime Text 2 window.
With Sublime Text 2, a project is always open, even if it is anonymous and unsaved.
In Sublime text 3, you can just drag and drop folders, it will open multiple folders. However i have not tried it in Sublime text 2.
Update:
Drag and drop works in Sublime text 2 as well.
From what I can tell, this behavior is built in. In Packages/Default/Main.sublime-menu, the listing for Open Folder… is
{ "command": "prompt_open_folder", "caption": "Open Folder…", "platform": "!OSX" }
Unfortunately, after searching all through the installation, there's no macro or .py file with the prompt_open_folder command, so it must be a hard-coded part of the binary, which makes sense, because it's a system call to the operating system/window manager to open a file picker dialog.
It should be relatively straightforward to write a plugin to select a folder for inclusion in the current window, but unfortunately I'm not quite able to at the moment.
For macOS users, use the command 'open' like so:
usr#mac ~ $ open -a "Sublime-text" "./Desktop/GitHub/uoe"
This will open all the folders in the 'uoe' directory in sublime provided you are at the root directory. For windows/Linux try finding something similar to 'open' :)
the file is located at
/Users/anand/Library/Application Support/iPhone Simulator/6.1/Applications/66751FC8-AC4E-4D62-93F1-DAAB2F3D67BF/Documents
but i cannot navigate to this path in the finder as the Library folder does not appear under /Users/anand listing.
I can list it in the terminal, but then how do i open the sqlite file to view the entries stored.
Please note I would like to use a visual tool and not the command line sqlite3
You can navigate to this folder by pressing cmd + shift + G in Finder and typing in the path. Or you can use the open <path> terminal command.
There are several visual SQLite clients for the Mac. See this question for details: Mac SQLite editor. My personal favorite is SQLIteManager.
If you are in finder, click Go, then hold alt key and Library will appear
I use Sqlite Browser