How to open plain text file in KDevelop with embedded text editor - kdevelop

I cannot open some text files with an embedded text editor depending on the extension in the file name.
For example, if I have Wavefront .obj file, KDevelop will open it with hex editor, in the Open With menu only hex editors are available.
There is File Type Options button in the file properties, but if I click to this button nothing happens and no output in stdout/stderr from KDevelop.
I am using Gentoo Linux distribution with KDevelop 5.5.2

Had same problem, and here's quick solution:
Click right on your file in file manager (in my kde it's default dolphin);
Select "Properties";
In opened window click "File type options";
In the next opened window select "Embedding" tab;
In services prefering order list select Okteta, and then remove it;
Click ok and it's done.
KDevelop after that, stops use hex editor and open files in embedded text viewer. Note, that this recipe would work only for one file type (or extension), that was selected in first step.

Related

Execute options in "File" Context Menu with batch file

Is it possible with a batch file to open a file then execute or "click" an option in the opened application "File" menu with just one .bat file?
So for example normally I would double-click the Firefox shortcut on my desktop then click on "File" > "New Tab".
Is it possible to do that with a single .bat file?
You can use the CursorPos.exe by #Aacini to move the cursor. Here is the download link: https://www.dostips.com/forum/viewtopic.php?t=3428. In the download page, you can only download the set of .exe files. Extract CursorPos.exe from them.
Usage:
CursorPos [[±]col [±]row]
If no parameter is given, return current cursor position as col+(row<<16) in ERRORLEVEL.
If any coordinate have sign, the position given is relative to the current one.
If cursor is moved, the Ascii code of the character at new position is returned in ERRORLEVEL.
And for mouse input you can use batbox.exe. Download link: https://batchprogrammers.blogspot.com/2016/06/batbox-awesome-batch-plugin-by.html?m=1. The full information is available there.

how not to open all files in a folder in Notepad++

Trying to filter file types in Notepad++ Open file dialog box opens all files of that type in that folder
I tried to go through the Options but given they are so many, can't seem to figure out whether one can get Notepad++ to just show the files of that type instead of opening them all
I don't have any code for this
Expected results: show all files of a file type
Actual result: all files are opened.
I found the setting: (I had never changed this setting, so it was curious)

Create new file with GTK

I have function creating a text file, I want that the user can choose the name and path of this text file opening a browse window. I saw gtkfilechooser but user only can choose a file and note create one defining name of the file.
I hope to have been clear.
GtkFileChooser and its implementations (GtkFileChooserButton, GtkFileChooseDialog, and GtkFileChooserWidget) can run in four modes: open file, save file, open folder, create folder. You want the save file mode. Look up GtkFileChooserAction and gtk_file_chooser_set_action(). Note that if you use GtkFileChooserDialog, this is one of the parameters to gtk_file_chooser_dialog_new().

Find a file by name in Visual Studio Code

How can I find a file by name in Visual Studio Code?
A Visual Studio shortcut I'm used to is CTRL+,, but it does not work here.
When you have opened a folder in a workspace you can do Ctrl+P (Cmd+P on Mac) and start typing the filename, or extension to filter the list of filenames
if you have:
plugin.ts
page.css
plugger.ts
You can type css and press enter and it will open the page.css. If you type .ts the list is filtered and contains two items.
Press Ctl+T will open a search box. Delete # symbol and enter your file name.
I believe the action name is "workbench.action.quickOpen".
It is CMD + P (or CTRL + P) by default. However the keyboard bindings may differ according to your preferences.
To know your bindings go to the "Keyboard Shortcuts" settings and search for "Go to File"
It's Ctrl+Shift+O / Cmd+Shift+O on mac.
You can see it if you close all tabs
According to this Github page, it's now a simple Cmd+F inside the File Explorer tree on Mac (and presumably Ctrl+F on Windows). Found and highlighted all the README.md files I've been working on:
file search results in vscode file explorer pane
Caveat: The tree has to be fully expanded for this to work.

In gvim, how do I create a shortcut to open a file using the gui file open dialog

In gvim, when I open a file via the file menu I get my operating system's native GUI file open dialog. In most other editors you can access this via a keyboard shortcut instead of going to the file menu. But in gvim the shortcut (as it appears in the file menu) is :edit which is a "command line oriented" way of opening files, not a GUI for opening files.
Is there a command :blah that will start the file open dialog for me? I know other, similiar such commands exist (for example :set guifont=* will open the GUI font selector.)
:browse confirm e
should be what you're looking for.
For Gvim on Windows, just hit "Alt + F + O" key combo (equivalent to typing ":browse confirm e").

Resources