How did they write code without a Text editor or IDE the first time? - ide

When I started to learn programming, everyone said the first thing you need to code is a text editor or an IDE. Since then, I've been asking myself how did they program the text editor "to write the code in the future" without a text editor.
Did they write the code on paper and then put it into the computer? How?

Related

A Simple Word Macro for Automating Translation

I'm in need of a simple task on MS Word but can't execute it properly, as Word macros don't allow me to record mouse clicks and the the last system I have programmed was my C64.
What I want to do is to copy the paragraph I selected below the original and translate it to the specific language, Turkish in my case. By this way I can check the translation verse by verse in each paragraph more easily. Translating whole document isn't feasible as it overwrites the original text.
I suspect this this time consuming job can be automatized with simple macro. Any help is much appreciated.
Thanks in advance.

Printing off VBA Scripts. What is the best way to modify formatting of printout?

This is going to sound absurdly stupid but here we go.
Over the course of my job this summer, I have developed several tools using VBA for the company. I am going back to school and in order to get credit for the job (and waive an internship requirement) I need to show what I've done.
In an appendix, my teacher would like to see the raw coding from my macros.
Now I know that I can print the script out directly from VBA but I am not able to format that the way that I would like before printing.
In addition, I would like to have the printout maintain the formatting from VBA (so tabbed lines and colored text) which I noticed printing it does not do.
Does anyone have any suggestions on what I could use to print out my scripts?
Thanks,
That guy who is hopelessly lost.
If you copy and paste the code into Notepad++, and save it as VB code, you can set the print setting (under Settings, Preferences, Print) to WYSIWYG.
Then, when you print it out, it will give you the indentation and colour coding.

Finding the regular expressions search in jEdit

I am not a programmer, I am a book editor, and need to automate a task. I need to be able to load my entire book into a program to add <p> before every paragraph, and </p> after each one. Currently I have to go through and entire book on notepad and manually do it.
Guido Henkel in his book "Zen of eBook Programming" describes it like this:
Copy your whole book's text into the text editor.
Run a regular expressions search and replace.
Where do I go to do a "regular expression search and replace" in the jEdit program? Does jEdit need to be set up or have plug-ins installed?
The top of the search box says "find" I have the code I am supposed to use; it's just that when I opened the program, I experienced the shock of being in a strange country. Anyone help me out?
I assume you are using jEdit editor http://www.jedit.org . No plugins are needed to just replacing text by regular expressions.
Open the Search And Replace dialog via click Search in the menu bar and select Find...
Turn on Regular Expressions, put .+ to the Search for box, put <p>$0</p> to the Replace with box then press Replace All

Tool to Surround or Wrap Highlighted Text

StackOverflow's WYSIWYG has the ability to quickly surround highlighted text through keyboard shortcuts.
For example, when I push Ctrl+B on some highlighted text, it would bold the text or surround it with two stars.
I am looking for a tool that will give me this function but with "custom-input". That is... instead of bolding the word, I could surround it with a <div> tag or... in my case, I need to localize my Wordpress Plug-in, thus __("Surrounded Text").
I am currently using Notepad++ but I can't find any way to create this function.
Can this be done in Notepad++?
If it can not, I would like some suggestion for a IDE that can.
Thank you.
If you've never used an "optimized" text editor, Vim would be a sea change, but it does have a great surround.vim plugin.
Emphasize hello: ysiw<em>
<em>Hello</em> world!
Finally, let's try out visual mode.
Press a capital V (for linewise visual
mode) followed by S<p
class="important">.
<p class="important">
<em>Hello</em>> world!
</p>
Alternatively, you could probably get a fair bit of the functionality for which you are looking with an AutoHotkey script, but at best I think you'd have to do the highlight-first thing like the StackOverflow WYSIWYG editor.
Still, this would probably allow you to keep using Notepad++.
You can do this in VIM using the surround plugin

How to Pretty print VBA code?

How do you copy VBA code into a Word document and retain the VBA editor color scheme?
You can use Notepad++ to accomplish this in three ways. Just so you know, Notepad++ is a more advanced version of Notepad, which supports syntax highlighting of different code files "out of the box" - Visual Basic included!
Download & install it, fire it up, and load up your VBA code. You should automatically see it beautifully coloured (if not, because the file extension is something other than .vb, go to Language -> VB or Language -> V -> VB).
If you need to change any of the colours, you can easily do so - just go to Settings -> Styler Configurator. From that menu, you can change the various highlighting and font options, to suit your needs - although the default usually suffices for most.
Then, go to Plugins -> NppExport. From there, you have three options you can consider:
Directly print from Notepad++
Copy all formats to clipboard
Export to RTF
Export to HTML
The first is self explanatory. The second one - "Copy all formats to clipboard" - will copy the entire file with the highlighted syntax to the clipboard. Once you click it, then open Microsoft Word or your other favourite document editor, and just hit paste! You should see the beautifully syntax-highlighted code. If something goes wrong, then you can try one of the other options (export to RTF/HTML), although I've never had a problem with the clipboard method.
There are two programs on cnet downloads, which are free to try. In case you did not try them, here are the links:
VB-VBA Code Formatter & Printer 2.2
VBAcodePrint 6.13.110
Smart Indenter could be what you're looking for? You'd load the result into Notepad++, set language to VB and save as .rtf/.doc (or print to file, can't remember off the top of my head).
For a more modern approach, Sublime Text users can install ExportHTML from Package Control. This has the added benefit of being able to include the line numbers, and changing the code coloration.
HTML files can be opened directly within Word.
Highlight supports a wide range of Operating Systems and 150+ languages including Visual Basic, although I'm not sure about VBA.
I would recommend this one: planetB
It works well with Internet Explorer (didn't work wit Firefox for me, not sure abt Chrome).
Plus it's online, so no need to install anything (the case of Company/University PC's)
Regards
Wheeliam
The following works with Visual Studio Code:
Start VS Code.
New file.
Copy & Paste the VBA code into the VS Code window.
In the lower right-hand corner, click on "Plain Text" and select "Visual Basic" instead. Note that the code is now syntax-highlighted.
Copy & Paste the formatted code into Word.