I've installed Sublime Text 2, and wbond's SFTP plugin. This plugin installs a bunch of key shortcut bindings (and I can find the file in my preferences.. they're all there) but my shortcuts are not working.
In particular, I'm dying without the CtrlAltR,CtrlAltB and CtrlAltR,CtrlAltN bindings.
How can I get these to work?! I've never had this kind of trouble with sublime before.
{ "keys": ["ctrl+alt+r","ctrl+alt+b"], "command": "sftp_browse_server"},
{ "keys": ["ctrl+alt+r","ctrl+alt+n"], "command":"sftp_last_server" },
Sublime Text 2 on Ubuntu
3.2.0-49-generic #75-Ubuntu SMP Tue Jun 18 17:39:32 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
http://wbond.net/sublime_packages/sftp/usage#Usage
I had the same issue on Windows 7 , shortcuts didn't work.
The solution in my case at least was : Preferences > Key Bindings Default >
and I changed the line
{ "keys": ["ctrl+alt+r","ctrl+alt+b"], "command": "sftp_browse_server"}
to >{ "keys": ["ctrl+alt+b"], "command": "sftp_browse_server"}
I think if it has two key combination it wants both of them to pressed to work.
I mean to press ctrl+alt+r and release and then press again ctrl+alt+b.
Silly, I know. So set one combination of keys you prefer.
I went with b personally. Hope this helps.
Related
I have QtCreator on a PC running Windows and Ubuntu. Ubuntu I use to build a project for Linux and for RaspberryPi. A Windows PC is used to build the project in x86, x86_64 and android: armv7a, arm64, x86 (for the emulator). Also windows is used to develop embedded software for stm32. Accordingly, I need 6 qbs profiles for windows and 3 profiles for linux. The project itself uses QBS as a build system.
The problem is that it is very difficult to determine which set is currently in use. Below I give the beginning of my qbs file, where I initialize the main variables.
import qbs
Project {
property var _TargetEnum: ({
win_x86 : 1,
win_x86_64 : 2,
raspberryPi : 3,
stm32 : 4,
android : 5,
linux : 6,
})
property var Target
Properties {
condition: (qbs.targetPlatform === "windows")
Target: (qbs.architecture === "x86") ? _TargetEnum.win_x86 : _TargetEnum.win_x86_64
}
Properties {
condition: (qbs.targetPlatform === "RaspberryPi")
Target: _TargetEnum.raspberryPi
}
Properties {
condition: (qbs.targetPlatform === "stm32")
Target: _TargetEnum.stm32
}
Properties {
condition: (qbs.targetPlatform === "android")
Target: _TargetEnum.android
}
Properties {
condition: (qbs.targetPlatform === "linux")
Target: _TargetEnum.linux
}
property var _BuildModeEnum: ({
debug : 1,
release : 2
})
property var BuildMode: qbs.buildVariant.contains("debug") ?
_BuildModeEnum.debug :
_BuildModeEnum.release
...
}
QBS profiles created automatically do not have completely filled fields and I have to manually fill in these fields using the qbs-config-ui utility. Moreover, the behavior of this utility and qtcreator is different in windows and linux.
In windows, the following happens: after opening qtcreator, the old settings in Tools-Kit-Qbs remain from the last working session, after opening a working project, the settings are reset to the default state. Next, I open the qbs-config-ui utility and manually make changes to qbs.targetPlatform and qbs.architecture in the packages I need, I save the settings. In QtCreator, I open the settings window and see that my changes have been made. Then I can work until the next working session.
In Linux, this behavior is generally absent, no regularities how the profile is updated in QtCreator and how it flies I have not yet been able to see.
My question is how do I properly configure QBS profiles once and for all so that I don’t have to reconfigure them.
Do not try to attempt to amend qbs profiles derived from Qt Creator kits "from the outside" -- that will not work reliably, as you've discovered. These profiles can get regenerated at any time. Instead, go to Tools -> Options -> Kits and do your changes via the "Additional Qbs Properties" entry in the kit dialog. These changes will persist.
I just installed the new Windows Terminal from Windows stores. I also have installed Ubuntu 18.04 WSL. But I am getting only two types of terminal options in Windows Terminal. How I can get the option of Ubuntu terminal in it. Also, I want cmd to be my default terminal in it rather than PowerShell.
You need to change settings
Click "Settings" in right top corner of above image, the file profile.json file will be opened. Then inside the word "profiles" in profile.json file, add below snippet.
{
"guid": "{78e390db-1bff-4533-9d7c-20f53d8bafa1}",
"name": "WSL",
"colorscheme": "Campbell",
"historySize": 9001,
"snapOnInput": true,
"cursorColor": "#FFFFFF",
"cursorShape": "bar",
"commandline": "wsl ~",
"fontFace": "Consolas",
"fontSize": 12,
"acrylicOpacity": 0.75,
"useAcrylic": true,
"closeOnExit": false,
"padding": "0, 0, 0, 0"
}
Near the word "schemes" in profile.json file, you need to update below:
"schemes": [
{
"name": "Campbell",
"foreground": "#A7B191",
"background": "#0C0C0C",
"colors": [
"#0C0C0C",
"#C50F1F",
"#13A10E",
"#C19C00",
"#0037DA",
"#881798",
"#3A96DD",
"#CCCCCC",
"#767676",
"#E74856",
"#16C60C",
"#F9F1A5",
"#3B78FF",
"#B4009E",
"#61D6D6",
"#F2F2F2"
]
}
The complete setting file (profile.json) which can be obtained here.
Actually, the WSL here is Ubuntu.
Besides, you can add icons to different types of tabs.
You can add icons for the Ubuntu profile to this folder:
$env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bb\RoamingState
I put some 32x32 PNG in this folder, and then in profile.json I can reference the image resource with the path starting with ms-appdata:// .
The icon is available here:
Icons
Then replace the contents of the new profile-withIcons.json file below with the previous settings.
profile-withIcons.json
After finishing the contents of the folder is like this:
The final result is:
An even easier option: Go to Settings -> Apps -> Apps and features -> find 'Windows Terminal' in the list -> select 'Advanced options' then choose reset.
For me after installing Ubuntu from Microsoft Store it is appeared like this, it should also work.
{
"guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
"hidden": false,
"name": "Ubuntu",
"source": "Windows.Terminal.Wsl",
}
Default there will be a penguin icon, you can add your own like this;
"icon": "ms-appdata:///roaming/ubuntu_32px.png"
You can place your icon file here like mentioned above.
$env:LOCALAPPDATA\packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\RoamingState
I noticed that installing Windows Terminal when the Ubuntu WSL is already installed automatically adds the Ubuntu profile to the WT. So reinstalling WT might be the quickest solution.
If Windows Terminal is already installed prior to Ubuntu WSL form the app store, open the Ubuntu app, let it install, enter a new username and password. This will automatically add an Ubuntu profile to Windows Terminal.
I'm new to Atom, the text edit, and I installed many packages, including Linter
https://github.com/AtomLinter/Linter
But it's not showing errors or highlighting code, it's just getting ignored.
Do any of you know what I should do to get this to work?
You have to additionally install a linter package for your desired language.
Here is a list: https://atomlinter.github.io/
I needed to remove atom config and start from scratch to make linter working
mv ~/.atom ~/.atom.bak
Instead of opening atom from the terminal like I normally do, I opened it from the application icon. Then atom asks if it was ok to install linter dependencies and presto it was working.
Hope this helps.
My problem with linter-eslint was because I accidentally installed eslint 8 which is not yet supported by atom linter or linter-eslint. After I installed eslint ^7.32.0 and typed npm i, restarted Atom and changed ecmaversion from 13 to 12 everything started working fine!
When I start Atom up, the small UI panel in bottom left is present, but shows zero values for the 3 severities.
If I then do a CTRL-s/save (even with no changes), it starts working..
In my package settings, I have "Lint on Open" (which doesn't seem to work at all) and "Lint on Change" (which is "only for supported providers" so could be that) ticked.
Here is my .eslintrc. Hope it helps.
module.exports = {
root: true,
"parserOptions": {
"ecmaVersion": 7,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
}
},
"extends" : "rallycoding",
"rules": {
"react/require-extension": "off"
}
};
I had to add the path of my project's node_modules dir to the Atom's eslint package settings, as well as create an .eslinterc.json file in my project. After doing both those, I had to restart Atom (I started it from the command line $ atom .) and it started working.
Is there a good possibility to convert Sublime into a simple IDE that allows to edit, compile, link and run C prgograms. Without SublimeClang please, since this is not maintained anymore.
Read up on Sublime's build systems and make. Both are very powerful tools, and allow for a lot of customization. You might need to do a bit of shell scripting to tie everything together into one command, but it's definitely possible, and not that hard, especially if you make good use of the built-in variables. The existing C++ system (available in Packages/C++/C++.sublime-build) should give you something to start with:
{
"cmd": ["g++", "${file}", "-o", "${file_path}/${file_base_name}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"variants":
[
{
"name": "Run",
"cmd": ["bash", "-c", "g++ '${file}' -o '${file_path}/${file_base_name}' && '${file_path}/${file_base_name}'"]
}
]
}
Please look for bendras.co.uk blog post about Sublime Text 3 as C++ IDE by Paulius Zaliaduonis. You will find more details how to do it.
Here is what you'll need:
ctags
gdb
Sublime Text 3
Sublime Text Package Control
Sublime package CTags
Sublime package SublimeGDB
Your build system
All packages should work on most platforms: Windows, Linux, iOS?
I installed sublime text 2 with all php dependencies.
And also a package for code complete called sublimecodeintel.
There is not zf2 supported auto code complete.
For example, when I start writing
\Zend\Form\...
at each steps CTRL+Space does not give any subclasses of Form
or for example after this:
$testimonial = new \Application\Entity\Testimonial();
when I write this:
$testimonial->
CTRL+Space shows a list but there is no methods listed from Testimonial php class.
Please help.
You might need to add the path to the ZF2 folder if they aren't in one of the project folders, or you could add a .codeintel/config file to your project root and add:
{
"PHP": {
"php": '/usr/bin/php',
"phpExtraPaths": ['path/to/ZF2'],
"phpConfigFile": 'php.ini'
}
}
So make sure you have the paths set up correctly, and it should work.
Also SublimeCodeIntels default mappings for autocomple is:
Linux: shift+ctrl+space
Mac: shift+super+space
Windows: shift+ctrl+space
Sublime Text 2 is not an IDE and so does not have autocomplete. You could try installing the SublimeCodeIntel package and see if that works for you.
Alternatively, consider NetBeans, PHPStorm, Zend Studio or Eclipse/PDT which are all IDEs that understand how to do auto complete with PHP.