How to make Sublime Text 2 use Cygwin instead of cmd? - grep

I would like to use this plugin to, for example, grep selected text, so I need Sublime to use Cygwin instead of cmd for that.
Any way to do that via Sublime Text 2 settings?

One option may be to point cmd prompt to all the binaries that cygwin has access to. I used cmd prompt as my 'terminal' by editing my PATH to include the binaries that cygwin includes.
if you're in windows 7 you can:
1) right click on computer, select properties
2) click on 'advanced system settings' on the pane on the left
3) click on 'enviornment variables' in the bottom right
4) depending on if you want this to be system wide or for your user only, edit the variable 'path' to have the path to your cygwin binaries. This will look something like adding the following text to the end of the path variable: ";c:\cygwin\bin"
now you can use cmd prompt to do most of the stuff cygwin allows you to do, such as use ls, mkdir, grep, etc.

Related

JetBrains IDE make link clickable in .txt files

I am opening a .txt file with my PyCharm IDE that contains multiple links among several other lines of text (actually these are logs from a continuously running script).
Like so:
----------------------- session start, Tuesday 12.10.2021, 12:48:53
>> some logs... -- 12:49:34
link: https://www.example.com/p/CU5Hn-RsSB9
>> more logs... -- 12:49:34
Now for convenience I would like to be able to click on that link rather than copy/pasting it to my browser - it seems like this should be a possible setting somewhere in PyCharm: But I cannot seem to find it and also not find any information on it on the web.
Anybody knows how to make links clickable in .txt files opened in PyCharm?
The ideal solution you are asking for would be configuring clickable URL links in the editor window but that is not currently supported by PyCharm.
That kind of configuration is hardcoded in the PyCharm IDE. For example, URLs are clickable if they're inside a Python comment or a Markdown file, but they can't be turned on/off; only the colors highlights can be configured (and thus the corresponding dialogues in the settings are an integral part of PyCharm that can't be changed.) Neither is there any way to create new file types with those configurations. You can see one such example by going to File > Settings > Editor > Color Scheme > Markdown and checking the Auto Link item in the list.
In these cases the alternative to your specification would be installing a plugin that implements the functionality. I searched the JetBrains Marketplace but I think no plugin is currently available that implements what you want. (A few are close, like TxtReader or Awesome Console but these still rely on sending the file/output to the console, they don't make the links clickable in the editor window.)
Having said that, the closest native alternative using vanilla PyCharm (without installing plugins) would be running the Terminal as an External tool to read the .txt file. This has the desirable advantage of opening the file inside the IDE and since PyCharm supports several terminals you get the flexibility of using the terminal specific settings you prefer.
Here's an example of configuring PyCharm's External Tool to open the .txt using Window's CMD. (Using the command line arguments /c more is terminal specific. Also notice the use of the $FilePath$ and $ProjectFileDir$ PyCharm specific macros.)
After your External Tool is configured you can use it by right clicking on the open file in the editor window or in the Project files view. In the terminal you can see the .txt file having the clickable URL.
Another alternative could be configuring the IDE's External Tool to launch a 3rd party text editor to open the .txt file; but the main drawback of that approach is it would open the file outside PyCharm.
For me, it looks like you can display a clickable link to a file, provided :
the file exists,
the file is a python file (ends with '.py'),
the file is in the project (the file owns to a directory inside the project)
for example, your file is "main.py" and your project root is "/Users/puiseux/GitHub/myproject" then the two lines
>>> filename = "/Users/puiseux/GitHub/myproject/main.py"
>>> print('File "%s", line %d' % (filename, 12))
will display a clickable link to the line 12 of file "main.py"
File "/Users/puiseux/GitHub/crypto/main.py", line 12
If you do not fulfill one of three conditions, it does not work

Straightforward way of copying text from byobu to system clipboard?

I frequently want to copy snippets of command outputs to the web browser. Doing so is nice and simple in gnome-terminal (mouse-select, right-click, copy) but seems to be not so straightforwardly possible in byobu.
The procedure for copying outlined in the docs is:
Enter scrollback using alt-pgup or alt-pgdn, press the spacebar to start highlighting text, use up/down/left/right/pgup/pgdn to select the text, and press enter to copy the
text. You can then paste the text using alt-insert or ctrl-a-].
However, this doesn't copy to system clipboard (and seems to involve quite a few keystrokes)
This source suggests using xsel
https://askubuntu.com/questions/33789/how-do-i-integrate-byobus-copy-buffer-with-the-x-clipboard
which doesn't work for me and would be rather less convenient anyway(what if I want to scroll up to several commands earlier that ran in a different context?)
What I would like is, ideally, a way to copy to the system clipboard that works in the same as gnome-terminal eg. highlight -> ctrl+shift+c or right-click copy or some way to integrate the byobu copy buffer with the system copy buffer.
I'm using Ubuntu 16.04 with Gnome and byobu 5.106-0ubuntu1
As pointed out in this comment, holding the shift key seems to be the solution to your problem. So:
Shift+F11 to zoom in on the split that you want to copy from
Shift+select what you want to copy
Shift+right click, copy (or by the way, Shift+Ctrl+C that also works in gnome-terminal)
I had some issues when selecting command outputs bigger than an entire screen, mouse select may be harder on these cases. My preferred method is to use <shift+F7> to capture output from desired split to a new PRINTSCREEN.
After that I select the desired portion of output at PRINTSCREEN using editor shortcuts and then getting it into system clipboard (e.g. using vim select then "+gy).

Restore Delphi environmental paths

In Delphi 10 Seattle, I clicked the "Delete invalid paths" button in Options->Library->LibraryPath and it messed with some of the default environmental paths. Is there a way to restore the default settings?
For example:
$(BDSLIB)\$(Platform)\
$(BDSCOMMONDIR)\Dcp\$(Platform)
(these are invalid)
There are default and build in way for restore your settings. This way available for many years (more than 15)
run Delphi with command line parameters -rXXX
bds.exe -rXXX. What will happen:
The name you provide after -r is a registry hive. If that registry
hive does not exist, the IDE create a brand new registry hive with all
the defaults and uses it. Because this takes you back to all the
default settings, it fixes most start up problems with the IDE. Note
that because custom controls are not part of the defaults, this
technique will result in your IDE not having any custom controls you
have installed previously. Custom controls are the most common cause
of this error, so you will probably want to add any you have one at a
time and test.
Your new registry hive will be stored in the registry at
HKCU\Software\Embarcadero\name\version. Your current settings for the
IDE are stored at HKCU\Software\Embarcadero\BDS\version. You can
compare the two registry hives using regedit to see what is different.
you could restore your Library/Browsing path from new environment, by copy them from XXX environment and paste it to regular one.
Read more at http://docwiki.embarcadero.com/RADStudio/Berlin/en/IDE_Command_Line_Switches_and_Options and on http://support.embarcadero.com/es/article/42597
There's no way to restore them short of a reinstall. However, here are the ones I have in my Seattle installation (which should be pretty vanilla, since it's a fairly fresh install on a new laptop and I've been using Berlin). I'll put it in two formats - a direct copy/paste version and a list of individual items, so you can use either easily.
Single line copy/paste:
$(BDSLIB)\$(Platform)\release;$(BDSUSERDIR)\Imports;$(BDS)\Imports;$(BDSCOMMONDIR)\Dcp\$(Platform);$(BDS)\include;
Individual entries:
$(BDSLIB)\$(Platform)\release;
$(BDSUSERDIR)\Imports;
$(BDS)\Imports;
$(BDSCOMMONDIR)\Dcp\$(Platform);
$(BDS)\include;

notepad++ nppgtag plugin shortcut

I have installed npp plugins from sourceforge nppgtags on latest notepad++ version but i am not able to effectively use that. I am facing these problem
Is there any shortcut for nppgtags plugin of notepad to search references, create DB, search definition and other command?
On the sourceforge page the image of the plugin have 3 windows
nppgtags
doc-switcher
tag-view
but i am only getting nppgtags window. am i missing something here or i need to install some other plugin for effectively using it.
adding image url: image of the plugin on notepad++
Got answer from developer on sourcefourge. link
I want to know if this plugin has any keyboard shortcut in it.
I haven't predefined any shortcuts on purpose because when you have a lot of plugins those might have conflicting shortcut keys. So I've left the shortcut definitions to the user and to his preference.
To set a shortcut in Notepad++ go to the Settings menu, Shortcut Mapper... . Chose Plugin Commands, find NppGTags commands in the list and define whatever shortcuts you need. Those will be saved in your Notepad++ config folder, shortcuts.xml file.
what are the other plugin you are using in that.
The one on the left is actually Notepad++ internal function - Doc Switcher. Go to Notepad++ Settings menu, Preferences... , select General. Find there Document List Panel and mark Show + optionally Disable extension column as it is in my case.
The one on the right is TagsView plugin. It is available through PluginManager and can be also found in SourceForge if you search for it.
The names of the plugins can actually be seen from their windows titles. Just look at the screenshots, above each plugin's sub-window. There is written its name.

Configure native vi to emit spaces instead of tabs and not convert autoindent spaces to tabs?

I would like to use spaces instead of tabs when editing Perl scripts with the native vi found on Solaris systems.
I know this can be done with the vim clone, but I don't have access to install vim on these systems as they are vendor locked.
Firstly, is there a way to configure vi to emit spaces when I press TAB?
And secondly, I am also using the auto-indent feature of vi:
:set ai
The problem is, when I manually enter spaces for indenting vi converts groups of 8 spaces into tabs automatically when it does auto-indenting. I guess if I can find a way to turn this functionality off it will be a start.
For an outside-the-box option, could you export the Solaris filesystem using NFS and edit the files you need on another system with a more capable editor?
I believe you want
:set et
(short for expandtabs). I think vi classic supports it.
I realize this is well beyond the best-by date, but I just ran into this issue and was looking for an answer myself. A real pain when editing yaml on a FreeNAS box.
Anyhow, I successfully dealt with the issue by setting the value of tabstop to a large value.
':set tabstop=1000'

Resources