Whitespace and indentation in F# - f#

I'm just learning about F# and plan to use it for my next project. One thing I find immediately confusing is the lack of support for tab characters in .fs files. I love how indentation is used to show scope/hierarchy, but using spaces just seems so antiquated. Do I have to press backspace four times just to get back to the parent block? What happens if I accidentally hit backspace only three times but don't notice it and keep typing?

If you're using VS2010, then pressing "tab" will indent four spaces, and subsequently, pressing "backspace" will also "do the right thing" for you. (I expect that some other text editors also have this feature, or at least you can configure them to do so.) If you do happen to get the wrong indent, then you're like to get error/warning squiggles as quick feedback in the VS editor.
If you're using a professional version of Visual Studio 2010, then I recommend using Column Guides from the Pro Power Tools extension. Watch this video
http://msdn.microsoft.com/en-us/fsharp/ff742849.aspx
(specifically, about two-and-a-half minutes, starting at about 2:05) to see how to use Column Guides to make F# indentation easier to discern.

If there's no other option to make this easier, you can turn on visible whitespace in Studio with Control + E, Control + S.

Related

How to let vim do syntax highlight right for flutter?

Some background: I am using VSCode for coding in flutter. But when I open many workspaces, it ate all my free RAM quickly (Macbookpro 8GB). (IntelliJ is even worse.) Sometimes, I just need to check other workspaces' Code etc.. So The best option is to use vim for this purpose.
I have installed dart-vim-plugin, but the syntax highlighting is not really correct for flutter, for example, BuildContext, Scaffold, AppBar etc.. all the class types are pure white color. To minimize the RAM usage, I just don't want any analysis server, auto completion etc.. I just want the editor has a correct syntax highlighting so that I can easily check the code. Is that doable?
Thank you very much for your help.
PS: I just want to use an editor which only does syntax highlight. I really don't have much free RAM. Normally, there are only 600MB left and I don't want to use them all.
Even if I am new to vim syntax highlight, since nobody provides an answer, I have to study how to do this by myself. I have created my own dart.vim and put it at ~/.vim/after/syntax/dart.vim. Note this is just an add-on for dart-vim-plugin, you still need to install it. Hopefully, this will help somebody some day.

Text wrapping in SPSS-22 syntax editor

I use SPSS-22 on a Linux machine.
I would like to know, if I can somehow tell the editor to automatically introduce line breaks, once the edge of the window is reached, as I would like to insert some longer comments in the syntax without having to press return all the time.
The syntax editor will turn overly long lines red, but it will not wrap the lines for you. 251 characters is the maximum legal length, but you would probably not want lines that long in your output for readability, so wrapping them yourself is probably warranted.
You might be interested in the TEXT extension command for writing long comments that will appear in separate text blocks in the output rather than being buried in log blocks. TEXT supports html and rtf markup as well.
TEXT requires the (free) Python Essentials for Statistics. Details are on the SPSS Community website (www.ibm.com/developerworks/spssdevcentral), but the Essentials are automatically installed (unless you decline) with Statistics 22. I think TEXT is included in the Essentials, but if not, you can get it via the Download and Install Extension Bundles feature under Utilities.

Does Brackets (editor) have bundles like textmate

I just downloaded brackets after hearing recent buzz about the editor. There are some really cool / useful features out of the box.
Alot of my projects use templating engines, like twig. Does this editor support bundles for other filetypes? I have been using textmate for a while and by simply downloading the twig bundle I have highlighting and code snippets integrated into the editor. I am hoping brackets has a similar feature.
The short answer is: not yet, but soon.
Longer answer:
APIs for Brackets extensions to add a new syntax/language are currently in progress, and will probably be done in about a month.
Since Brackets uses the CodeMirror editor, syntax highlighting is driven by CodeMirror "modes." It doesn't appear that anyone has made a Twig mode yet. But it might not be too hard to build one, either based on the sample code for Mustache highlighting or the new "multiplexing mode" feature in CodeMirror 3 (Brackets is updating to CodeMirror 3 soon).
Brackets may eventually support directly importing TextMate language bundles, like Sublime does, but that's a ways off.
As a stopgap, you could have Brackets just highlight Twig files as plain HTML -- better than no color coding at all. That'll be doable with the upcoming extension APIs, but if you're feeling adventurous you could hack your current copy of Brackets to do that right now. Just dig into the app folder, open www/editor/EditorUtils.js, and add the file extension after the case "html": line.
(p.s. - I work on the Brackets core team. Thanks for giving Brackets a try!)

SynEdit change markers (yellow or green line on gutter)

does anyone know how to add "change markers" functionality to SynEdit? I mean those lines, green for modified & saved, yellow for modified & unsaved parts of document... here is an example from other editor: http://img222.imageshack.us/img222/6474/editori.jpg
Yes, I've added it to my copy of SynEdit. I originally snagged the code from another project.
It is broken across (at least) two different units IIRC.
You need to modify SynEditTextBuffer.pas as well as SynEdit.pas.
The code is rather complex because you need to modify several spots in SynEditTextBuffer.pas as well as 1 or 2 spots in SynEdit.pas.
The original project I snagged the code from was being very ambitious in that they were trying to develop code folding and line blocking (as shown in your image) as well.
I couldn't get the code folding to work reliably so I dropped that mod and just used the line change code. I believe that dropping the code folding also dropped the line blocking.
The name of that project is SynEditSudio, it from a Chinese website, but I believe the Firefox translator plugins work pretty well in converting it.
EDIT: contact me directly if you want to get a copy of my changes.
HTH
Ryan.

Whatever happened to jEdit [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 5 years ago.
Improve this question
I'm not sure if many people know about this text-editor?
jEdit was kinda big in 2004, but now, Notepad++ seems to have taken the lead(on Windows)
Many of the plugins haven't been updated since 2003 and the overal layout and usage is confusing...
I'm sure jEdit has many nifty features, but I'll be damned if I can find out where to find them and how to use them. Reading that manual is a fulltime job on it's own.
I've been using jEdit for a few years now, mainly on windows, but also on Ubuntu.
I use it for: SQL, awk, batch files, html, xml, javascript...
Just about everything except .NET stuff (for which I use Visual Studio).
I love it.
summary
I use jEdit because it has the right balance for me of ease of setting up vs. features and customisability. For me, no other editor strikes quite as good a balance.
cons
It can be a bit hard to make it do the things you want.
pros
I love the plugins
Being able to define my own syntax highlighting etc. is just what I want from a text editor.
The manual is very good and quite readable. I strongly suggest reading it through to get an idea of what jEdit can do for you. (In fact, I suggest this for any software you use)
It's cross-platform. I used it just on windows for a long time, but now I also use Ubuntu, and it works there: I can even copy the configuration files over from my windows machine, and everything works. Nice.
other editors
In the past I did take a look at Notepad++, but that was a while ago, and it didn't have a nice way to define your own syntax highlighting, which is important for me. I also paid for Textmate and UltraEdit at different times (both very good), but in the end, jEdit comes out on top for me.
I also used Eclipse for a year or so. It's fantastic, and it'll do anything you want, but you have to be really into Eclipse to get the most out of it.
I've occasionally wondered about the same thing (what happened to jEdit - though I'm not sure if that was your main question).
Apparently, the main developer, Slava Pestov, left the project in 2006 (to focus on Factor, and his studies), and the jEdit development has never really picked up again after that. Which is a shame. :/ (I haven't actually followed closely, but I guess it's telling that there has not been a major release of jEdit in the last 4 and half years.)
Now, while googling around, I found some info written by Slava himself. It seems at that time he not only gave up jEdit, but developing in Java altogether, after becoming "increasingly frustrated" with the language.
I've been using jEdit since 2003ish. I use it on my Ubuntu 8.04 box at home, however it does have a few bugs: sometimes when you click on a button which opens a dialog, such as "Open File", the dialog will be completely blank.
This could be a Java thing, but it seems a strange issue.
Other than that, I'm quite happy with jEdit - it's the best general editor I've found (so far) for Linux (ducks as hordes of Vi and Emacs users light up their flame cannons)
I like the XML Editor plugin: auto-completion when you close XML (including HTML) tags, plus if you specify a DOCTYPE it gives you auto completion.
There is also a handy plugin for visually viewing diffs between two files.
jEdit is by far, my prefered editor since 2010. It has a unique set of features that I didn't found in any other:
Multi OS: Win, Linux, Mac.
Portable: Just copy a folder and it is ready to use. All settings are kept in .XML and .properties files inside jEdit subfolder. This is crucial if you don't have admin rights on your enterprise workstation.
Search-Replace: The most enhanced I've seen in a text editor: Full Regex specification with Bean Shell scripting capabilities for back references. For instance: Let's say you want to apply an increment on every number found in your text (replace 1 by 2, 10 by 11 and so on). Just search for regex "(\d+)" and replace by a Java expression "Integer.parseInt(_1) + 1". It's just a simple example, but enough to show how powerful it is.
Database: Just select your SQL statement, press a button and get the resultset from MySQL, MsSql, Oracle, Teradata and any other Jdbc compatible RDBMS. Export results to csv. Works like a multi-database command line tool. Browse and navigate on your database schema. (SQL plugin).
Customization: Here is where jEdit shines. There are tons of features. The highlight is the ability to use any java API to expand it! Access them from your Beanshell scripting macros. Example: I needed a function that decode selected text from/to mime64. No problem! I Just downloaded a library from commons.apache.org and accessed it from a jEdit macro. It's just unbeliveable how expandable jEdit can be with this feature.
Highlight: Select a word or phrase and it is highlighted right away in the entire text. The mini-map of ocurrences is shown in the scrollbar. It allows quickly find, for example, a respective css style in separated file just using the mouse. No need for Ctrl+F or type anything. It works even on ordinary txt files. (Highlight Plugin)
Plugins: FTP, XML, Text Diff, Themes, Text Tabs, Highlighter, character map, Mail, Whitespaces, Abbrevs, Minimap...there are hundreds of them.
There are dozens of other nice features that I won't describe here in order to keep this answer not too long. The complete article can be found here and the mime64 example here.
At first glance, jEdit is just another text editor. The full capabilities come into light when you start playing with it's endless customization/expansion power. My initial reluctance of accepting a java-written text editor disappeared when I realize that only a java text-editor could be so extensible. Its initial drawback turned into it's main advantage.
I have been using jEdit for the last five years. And I agree with Mr. Mahan's comment above, jEdit has reached the "just works stage" and does not really need anymore development.
I mainly use it for PHP web development and have tried everything from commercial IDEs (DreamWeaver) to php designer, NetBeans, Eclipse, Apanta and Notepad++. And nothing comes close for customization possibilities. If the plugin does not exist, chances you can whip something together with a BeanShell Macro (assuming you want to dig into Java).
On Windows I use Notepad++ as well, but mainly as a Notepad replacement (I even renamed the notepad.exe)
At the end of the day it comes down to taste. What is important to you and what will make you more productive. A distracting GUI and fluffy features can take you away from what you should be focusing on.
And to boot I have converted a few developers to jEdit along the way.
At the risk of performing necromancy:
Because of the way it's been released the last decade or so, major Linux distributions usually lag quite far behind the latest stable version. The good news is that there are repositories to install and upgrade it automatically on Ubuntu and more.
For a couple years I shared configuration files between Windows, FreeBSD and Linux without problems. That's more than I can say about any other application I've ever used.
The only issue I've heard about is that it used to be slow back in the dawn of time. Now it's really fast.
Encodings and line endings are handled more seamlessly than any other editor except IntelliJ IDEA.
Vertical editing. Just hold down Ctrl and drag to create a rectangular (or even a zero-width vertical) selection.
Better search and replace than any other editor ever except IntelliJ IDEA. I just started writing a list, but it has to be seen to be believed. Just Ctrl-f and see for yourself.
I had to use during my vocational education for XML and XSLT. It had a lot of bugs and didn't work always. I couldn't get to like it, but if I had to test some XSLT I'd give it another shot. I found Notepad++ and I am more than happy with it for what I need.
To your question: Did you take a look at jEdit's plugin list? There are some plugins released 2008 and the latest version was released on 8th August 2008.
Myeah, I just installed the 4.3pre15(latest) and it does look a bit better.
Super feature is the automatic XML DTD creation you can get from one of the plugins.
Now THAT is awsome, especially for big files
After many years, jEdit remains my favorite free validating XML editor. I love the seamless combination of XML validation with plain-text editing features such as regex search-and-replace across multiple files.
I have used jEdit for a number of years, both on PC and Mac (a bit funky on the Mac).
Currently I use it primarily as a folding editor for a number of on-going documentation notes. I have use the folding at the text indent levels - an easy way to collapse and expand file sections, without any work to set up each section.
The feature I really like are the command shortcut alternatives you can set up, the tool bar icon control, and the the abbreviation expansions. The Plugins I especially favor are the BufferTabs to display rows of file/buffer names, and the Whitespace and TextTools.
I recently loaded the GroovyScriptEngine, in part because of the syntax coloring and control for groovy. I set up 2 seperate jEdit versions, in part to maintain seperate history lists, as I update a few dozen files repeatedly.
I loved Notepad++ on windows, but when I made the switch to Mac I was left behind. Since then I have been in tune with utilities that work across multiple platforms so that is why I switched to JEdit over 2 years ago and I have been loving it ever since. It works flawlessly on my Mac, never crashes, is fast, and has many many add-ons. It is based on Java so it works on many different platforms. I think Jedit is equal to or better than Notepad++
My favorite plug-in is the FTP module. I can open, edit and save files on my FTP server just as easily as if they were local.

Resources