How to cut an entire line in SAP Web IDE - sap-web-ide

I'm used to using Sublime Text and I constantly use Ctrl-x to remove entire lines. In SAP Web IDE Ctrl-x only works on selected text.
Is there anyway to add this to SAP Web IDE?

Ctrl + d to delete the line
Alt + ↑↓ to move the line

Related

how do I change the way VS comment out the lines from `//` to `/**/`

In Visual Studio, I selected the lines and click "Comment out the selected lines" in the tool bar. The VS will put // in front of all selected lines. How do I change the style so that the VS put the selected lines in between /**/?
Currently, there is no such setting you want in C++ project. You can go to Developer Community to propose this new feature and post the link in comment. In addition, Visual Studio now supports Ctrl + Shift + / to comment and uncomment.

How can save to file the on screen output of a Python IDE?

I use Spyder as my Python IDE. In most of what I do I use the editor to write code and execute portions of the program one at a time. I typically go back and forth, change things, add pieces, execute portions... you get it. Is there a way to save to file what Spyder shows in the console portion of the IDE after each portion of code is executed?
(Spyder dev here) Well, there is a way to save the output shown in our consoles but not after each execution. You have to do it manually, like this:
For our Python consoles, you need to do a right mouse click over any console and select the option Save history log.
For our IPython consoles, you need to do a right mouse click over any console and select the option Save as HTML/XML
One way to capture entire console output of Sypder IDE:
1. Go to "Profile" (Shortcut: F10) under "Run" Tab.
2. On Right hand side, you can see Run, Stop and Output buttons.
3. Click on Run and the entire console session is captured under Output.
Hope, this helps. Kindly correct me if I am wrong.

How to fix indentation in Systemverilog source

I am using systemverilog very often.
I am using UltraEdit as text editor. I use also VIM.
Sometimes I have to copy code from some other places and paste it into my code.
It may not be indented properly. It is a difficult task to indent it properly again.
Can anybody suggest any method or tool to do it easily?
Method
Visit EDA Playground
Paste your code into one of the editor windows
Select all text with CTRL-A
Reindent all text with SHIFT-TAB
Some backgroud
There is a Verilog mode for Code Mirror which supports SystemVerilog. CodeMirror is an in-browser text editor written in JavaScript which is used on a number of websites, including EDA Playground.
You could also paste and reindent in the example window here, or you could download it yourself and run it locally.
The verilog mode in Emacs supports indentation, so you can open your file in Emacs (from the command line, run emacs file-name.v, select all by pressing Ctrl+H, then reindent by pressing TAB and save with Ctrl+S.
UltraEdit has command ReIndent Selection at bottom of menu Format.
All lines of a selection of any type of text file can be re-indented (not reformatted, i.e. not inserting line breaks or removing line breaks) with this command as long as
the file is syntax highlighted based on a wordfile (*.uew) suitable for type of text file,
the syntax highlighting wordfile contains appropriate indent/unindent string definitions.
Therefore it is no problem to re-indent code after paste by selecting pasted block and use the command ReIndent Selection with a good syntax highlighting wordfile for SystemVerilog.
The syntax highlighting wordfile currently used for active file can be opened for editing or improvement by clicking on button Open left of language list box preselected according to used syntax highlighting for active file at Advanced - Setttings or Configuration - Editor Display - Syntax Highlighting.
The lines of interest in the wordfile regarding indent/unindent start with
/Indent Strings =
/Unindent Strings =
/Ignore Strings SOL =
More information about those three lines can be found
in help of UltraEdit on page Syntax Highlighting,
in online help on page about wordfiles, and
in user forum topic template for syntax highlighting language wordfile.
A user contributed syntax highlighting wordfile for SystemVerilog can be downloaded from wordfiles page.
Note: As command ReIndent Selection is a basic command for all languages, it is not as smart as tools written to re-indent or even reformat source files written for specific languages with true language intellisense like Artistic Style for C / C++ / C# and Java (also supported built-in by UE).

Can WebStorm automatically format the code when I am writing?

In Visual Studio when I type some special characters like ;} it will automatically format related code segment, but in WS, nothing happens. I tried to find that option but ended without fruits.
// e.g. In VS, if we type something like:
var abc=123
// and then type ; it will be formatted as:
var abc = 123;
I am trying to understand why many people love WebStorm as a JS IDE. :)
PC: Ctrl + Alt + L
MAC: Command + Alt + L
Here you can find a nice tutorial by John Lindquist: http://www.youtube.com/watch?v=xIxDar8CbJA
This option is provided in WebStorm 8 (coming soon) - see IDEA-120066
Haven't used VS recently so I'm not sure what ;} does, but WebStorm can definitely expand templates. Above a function declaration, try typing /** and then Enter, for example - WebStorm will automatically generate a JSDoc heading.
Look also in the IDE Settings under Live Templates -> JavaScript. Typing us<Enter> will insert a "use strict;" etc.
If you want to reformat code, there's an option under Code -> Reformat Code to reformat the selected text (or the entire file). Though probably it's best to get used to writing code abiding by JavaScript style guidelines :) Comes in handy when you don't have an IDE at hand, e.g. editing on GitHub, in a terminal, on StackOverlfow (cough) etc.
Also, you should enable JSHint, which would highlight abc=123 as needing style improvements.
select Code > Reformat Code from the main menu, code formatting popup will appear.

Preventing Visual Studio 2008 (C++) from removing indentation tabbing in white-space only lines

Suppose I am writing an if statement in C++ with VS2008. I'm inside a function and therefore indented (a tab from the left margin, say). I type if{, hit enter and I'm now two tabs from the marging - I'm happy :-)
I move the cursor up a few lines to copy something and then back to just under the if{. Lo and behold, my cursor is now right against the left margin and I've lost my indentation. Grumpy! >:-(
I'm wasting my time retyping tabs and it's driving me bonkers. Please help me unlock the secret setting that allows me to get on with my work.
Edit: Incidentally, whilst developing in C# I experience the desired behaviour. It's just C++ that loses the auto-indentation.
To the best of my knowledge, there is no setting to get this to work in VS2008.
In VS2010, it does behave how you would expect.
If you can, I would recommend using VS2010. If you are doing c++-cli, you can set the project to use the .Net 3.5 framework, and then it compiles using VS2008. If you are doing vanilla c++, you can go into the project property pages, General and set the Platform Toolset to v90 to get it to compile using VS2008. Of course, you could just compile using VS2010 if that's an option for you.
If you view white space (Edit > Advanced > View White Space), you can see that when you press enter the tabs are not put into the file until some text is typed. When you click away, Visual Studio doesn't remember that you were indented.
A potential solution to you problem is in Tools > Options > Text Editor > C/C++ > General, you can check "Enable virtual space". This allows you to put the cursor anywhere and once you type a character it adds the tabs/spaces up to the cursor.
The option in C# that is missing from C++ is the check box "Indent block contents" in Tools > Options > Text Editor > C# > Formatting > Indentation.