How to create new file in VIM terminal(shell?) [closed] - vim

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I am working on CURRENTTEXT.txt in vim and would like to make a NEWTEXT.txt on that window.
:vs /space/where/I/want/to/store/new/file
Now I get VIM terminal? shell? on the one side of the window.
make NEWTEXT.txt
but fails

Vim, though it's a text editor, has quite a rich set of commands for creating and managing multiple "windows".
:vnew <filename> creates a vertically-split new window and opens the file. :vnew by itself merely creates a blank vertical-split window.
There are many controls available for moving and resizing them, jumping between them, changing the direction of the split... it's impressive.
Section 6 of the Vim Frequently Asked Questions talks about opening and editing multiple existing files and the Vim Wiki talks about all sorts of things, including using vnew.
When I'm really digging into a code project I'll have several splits open, sometimes to separate parts of the same file, sometimes diffing two or three files and merging parts of them, sometimes looking at the hexdump of one next to the text version. It's all in Vim's documentation and online help.

Related

Use custom formats in new Excel files [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have a set of custom formats that I would like to use in any new Excel files that I create.
I found this approach, Save cell styles to use in all new workbooks, but it relies on using a template which I cant use as I am using a cloud server so I don't have access to the XLSTART folder.
Using code is fine if I must, but I don't have experience in this space.
I understand that I may be able to create an Excel addin to hold the formats, and create a new workbook from that. Is this addin the way to go?
Please help!
Is this a desktop Excel program? If so, you might try adding another custom startup folder. (Depending on version it might be different, in 2013: Excel Options - Advanced - General - At startup, open all files in:.) Now if you put a file here, it will auto-open on Excel startup, just like the files in the XLSTART folder.
(But to be honest, I don't see how this will help you, since XLSTART - or any automatic startup folder - is useful if you want macros available. I'm not sure about templates.)

Edit an applescript file from a linux computer [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
Though applescript appears to be a scripting language like any other (wikipedia/applescript), for reasons I don't understand it seems these scripts are often saved as binaries. It seems like this isn't an issue for someone working on a Mac with a mac-based text editor that can open these scripts into a plain-text format where they can be edited and read, but for the rest of us, we just see gibberish. For instance, Github has many examples of .scpt files committed to repositories instead of/without the plain-text equivalent (a bit of Googling suggests this would be a .applescript file instead)
Question: Is there an open-source tool that can parse and serialize these binaries so that they can be viewed/edited in a standard plain text editor and saved back as .scpt?
(My context: I'd like to provide a user-friendly, os native button-click way to launch my application on a mac, rather than tell users to open a bash terminal and type stuff.)
Edit I only have access to a linux machine, I don't own a mac.
Instead of trying to create an AppleScript on a non-Mac, what you can do is simply name your shell script file with a .command suffix and make sure that it has execute POSIX permissions for the user. The user can then double-click the file in the Finder to execute your script instead of having to enter Terminal commands.
If you would like to take advantage of AppleScript commands within your shell script file to add some simple GUI functionality, you can use the osascript command.
BTW, for reference: on a Mac the application "Script Editor" (or "AppleScript Editor" on older systems) is generally used to create AppleScripts. It provides several save options - the .scpt binary and .applescript plain text files you noted as well as .scptd script bundles and .app standard, double-clickable applications.

How to search word in linux terminal [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
I have used terminal window for long time, There is a lot of stdout prints. Here I need command to search some word in history of linux terminal(stdout). like find option in text document.
To search through the commands you have executed run the following command
history |grep 'your search word goes in here'
In case you are using bash, you can also open the .bash_history file with any standard text editor and operate on it.
Well, i use screen for running the linux terminal.
There you can just do ctrl + a, followed by either / or ? and then the string to search in the stdout.
http://serverfault.com/questions/106388/screen-setup-tips
Check out the link to learn about screen, will make your life simpler!! :-)

OSX/Linux, slow down the output from terminal [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm printing to screen a long text file that scrolls very very quickly on my screen, is there a way to slow down the scrolling? In other words is there a system setting that controls the speed at which output is displayed to screen (OSX/Linux).
Simple answer: No.
Extended version: There are other solutions. You could pick from one of the following:
Use pipes. Using pipes allows you to redirect terminal output and to review it in your own speed. The appropiate symbol is |. Redirect the output to programs like less ore more. Both allow you to scroll through the output via pressing return, you can exit any time by pressing q. For instance, for handling a long directory listing, you could use
ls | more
Redirect your output into a file. If your output is cached in a file, it's persistent and allows you to open it with an editor of your choice to view (and edit) it. The symbol is >.
touch log.txt # create the file
ls > log.txt
nano log.txt # use nano text editor to view
script allows you to record entire terminal sessoins. This might be an overkill for your use-case, but is really useful. From the man page:
script makes a typescript of everything printed on your terminal. It is
useful for students who need a hardcopy record of an interactive session
as proof of an assignment, as the typescript file can be printed out
later with lpr(1).
Use less to page through files; you can page back and forth, search, etc.
xterm has limited control over scrolling speed; most other terminal emulators have none, because that's the wrong way to step through a file when you can use a program like less to filter the output.

How to get text into Unity? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I have a basic Java program with output of "hello world". What I want to do is to write a Java script to run that program and import that into Unity so I can use it in my program in Unity.
Is there a way?
You can communicate with Unity from a Java application trough OSC(Open Sound Control) and send text, commands triggers or load an external file(xml or similar) into Unity.
Unity and Open Sound Control
http://www.sundh.com/blog/2012/07/unity-processing-demo/
On unity you have to use function OnGui() to show text.
In the related documentation you have many example.
For show message in a console just use in a javascript:
Debug.Log("Hello world");
You can also put files in your /Resources folder in your unity project, then load them at run time. These can be pretty much anything. models, prefabs, materials... could be text files (maybe comma delimited txt files, that you parse) or more typically .xml files that you can easily access and extract data (text) from.
to load any resource file, use resources.load()
http://docs.unity3d.com/Documentation/ScriptReference/Resources.Load.html
Don't use OnGui as this is bad for performance rather use Canvas to edit and place the text you prefer on or in (parent) object you want.
to make this look better put the font size higher and the width and height lower.
this will make it look sharper.

Resources