Unknown shortcut "and Insert Terminator + LF" - aptana

Using Aptana Studio 3 and when using the shortcut ctrl+shift+enter to insert a line above the current line, Aptana will ask offer a drop-down with the following options:
and Insert Terminator + LF
Insert Line Above Current Line
I want Insert Line Above Current only but have been unable to find where to change this key code.

That top option appears to be coming from a key binding in Commands > Source > Move to EOL > "Insert Terminator + LF". Due to a Eclipse peculiarity, those key bindings are not listed in the default key binding preference.
To remove, you have to edit the bundle. It's pretty simple:
Commands > Source > Edit this Bundle. It will create a project in your workspace
Look in the commands folder of that project for the proper command (it should be pretty obvious)
Comment out or change the keybinding. You might have to restart.
For more info, see: http://wiki.appcelerator.org/display/tis/Modifying+your+shortcut+keys#Modifyingyourshortcutkeys-ModifyingtheBuiltInBundles

Related

Where is Atom keeping its state?

I'm on OSX and had a file open in Atom which I hadn't given a name to. I had to restart my computer and when it came back again I clicked the wrong thing and it forgot all the old file names, and the unnamed file seems to be gone without a trace. If I use Time Machine to restore the .atom file to an old state it detects that something is 'wrong' and pulls the most recent state from some other location (it gets recent filenames from somewhere). Any idea where it's getting that state from?
The literal answer to my question, found using some aggressive grepping, is ./Library/Application Support/Atom/IndexedDB/file__0.indexeddb.leveldb.
It appears to be that the dialog which caused Atom to forget my file list was shown as the result of a real bug rather than bad intentional UX.
Here are the instructions which got my file contents back (courtesy someone in the Atom slack channel):
Open the Chrome Dev Tools in Atom using Cmd + Option + I
Click the Application tab
In the tree view on the left of this tab, expand IndexedDB > AtomEnvironments and click on the table states
In the grid on the right, you'll see one or more entries keyed with editor-<some hash>
For each of those entries, expand the Object in the Value column and then expand this tree: Object > value > project > buffers
For each file in the "buffers" list, expand it and try to find the untitled file, it won't have a filePath property. The text field will have the file contents.

Batch file write to txt

I want to make a batch file that will ask user for input, than write that input to a specific position in an already written txt file(called commands.txt which contains query) and call sqlite3 < commands.txt
I need this so inside the commands.txt where the query is, in LIKE 'userinput' i will add the users choice (parameter)
Although your question is not really specific enough and verging on the kind of inappropriate question that for stackoverflow (it does not include code), as hinted at by the comment, I'll take it at face value and assume there is much you need help with.
First let me deal with the question "I need to make a batch file"
A batch file is a simple text file with the extension .bat. You can create it with a text editor like notepad. We do not know what kind of system you have (Windows, linux, Mac etc) but lets assume Windows as you asked for a batch file. We do not know which version of windows (7 or 8 etc), So I'll try and be generic.
All windows machines come with a simpe text file editor called notepad. You can open this by typing notepad into the search box on windows 7 or 8. Lets start with a simple batch file:
:: This is a batch file
#echo off
echo Hello World
exit /b
Type (or paste) those 4 lines into notepad. Now select the file menu and select Save As, now in the Save As Type: selector choose All Files. In the File name: box type the desired name with the bat extension, such as doit.bat. Ensure you choose a suitable directory to place your new batch file. Leave the encoding as ASCII. Click Save. You have now made your first batch file.
Now you need to execute that batch file. Using the Windows File Explorer find the folder where you saved that batch file. While viewing the folder, hold down the shift key on the keyboard and then right click in the background of the folder and select Open Command window here. You will now have a command prompt window. You can now execute your new batch file by typing its name doit. It will display:
Hello World
OK - Now you have created your first working batch file.
Now for the next part; Asking the user for input. This is done with the set /p command. Add this to your batch file (before the exit line):
Set /P Like="Give me your input: "
echo Your input was: %Like%
That has solved the second part. Now the third part, edit the commands.txt file. If you do an internet search for a similar problem (editing files in batch files) you might find this help page: http://www.ousob.com/ng/edlin/ng96d9.php. This shows a generic way of changing any text string to any other in a file using EDLIN from a batch file; unfortunately EDLIN (and EDIT) are no longer included in windows so these batch files are not much help.
A search of stackoverflow finds similar queries which contain an answer for you.
So now you have all the parts of the answer:
How to make a batch file
How to prompt the user for input
How to replace lines of text in the commands.txt
You should be able to put it together and get it to work....

Can't exit out of afiedt.buf

This is a very simple question that I can't find the answer to. I am in sqlplus (Oracle) and I made a typo and typed "edit" which opens up "afiedt.buf" which I understand will open my default editor which is "vi". Once I am in the editor I get "Wrote file afiedt.buf". Then I would like to see what the contents of the file is. When I type anything, I get a "?". Once I get the "?" I can not ctrl c, ctrl z or anything to get out. How can I exit out and see the contents of the file. I also tried "wq" and "!q". Neither of these commands worked. I would like to be able to edit the file once I have made an error and not type it over. Any help would be appreciated.
You can configure vi as SQLPlus editor with the statement DEFINE _EDITOR=vi (see the SQL*Plus User's Guide and Reference).
If you get back just a ? you are probably using the old ed editor which you can quit by entering the q command (see its guide with man ed).
To come out of sqlplus when any text editor 'vi' or notepad is not configured is by pressing Shift + q and Enter, you will be back into SQL> prompt.
Once you have come out of blank/stuck session back to SQL prompt, you can follow above mentioned suggestions to define an editor.
Try and enjoy!

Aptana Studio 3 SHIFT+ENTER option select

In Aptana right now, when we do SHIFT+ENTER, it brings up two choices:
New method - Press 1
Insert new line after current line - Press 2
I want to default it to the second option, but I have not found any option for it. Help?
This worked for me
Under Commands find the Bundle that shows the key binding you want to change
Locate the name of the binding
Under Commands > #BINDING# > edit binding
The ruble project will appear in the Project Explorer
Under the command folder locate the command and update its binding in the .rb file
Restart Aptana

Unable to modify re-opened files in vim(file permissions not a problem)

I am working with vim. I created a new cpp file using
vim xyz.cpp
After opening the file, I added some basic includes and comments. Then I closed it(:wq!) and re-opened it only to find that I am not able to delete/edit the previously written commands, even after pressing i (for insert), although it gets into insert mode and I am able to add new text to the file. I must say that when i am NOT in the insert mode, then I am able to delete individual characters by pressing x . But it doesnt solve my problem.
I checked the file permissions and it says -rwxrwxrwx, so I dont think permissions is the issue. Has anyone faced this problem before. Any kind of help will be appreciated.
Thanks
:help 'backspace' is your friend
Influences the working of <BS>, <Del>, CTRL-W and CTRL-U in Insert
mode. This is a list of items, separated by commas. Each item allows
a way to backspace over something:
value effect ~
indent allow backspacing over autoindent
eol allow backspacing over line breaks (join lines)
start allow backspacing over the start of insert; CTRL-W and CTRL-U
stop once at the start of insert.
When the value is empty, Vi compatible backspacing is used.
Try to set it to
set backspace=indent,eol,start

Resources