text-editor

What are the best options for Rich Text Editing in Rails?

前提是你 提交于 2019-11-30 03:48:48
I'd like to use Rich Text Editing in place on forms in order to let admins change instructions. What are the best options for doing this? [To be more clear - the admins are non-technical but may want to control some formatting without using markup or with as little markup as possible. What I'd like is for them to be able to edit inline all AJAXy with an RTE featuring some formatting controls and then submit and be able to see what the instructions will look like to the end user without changing pages. With Regards to plugins specifically, what I'd like to know is which Rich Test Editing

Gnat for Mac Ada programming

情到浓时终转凉″ 提交于 2019-11-30 03:06:31
问题 I'm learning Ada 95 in my programming class, and I would like to install the gnat compiler on my MacBook. I have no clue as to where to get a good gnat to compile my code, and how to install it. I currently have gedit as my text editor, because that's what we're using in our lab environment. I'm new to the Mac world so any help would be greatly appreciated. 回答1: There's an excellent free Ada compiler for Mac OS X available from AdaCore. You should be OK with the GNAT GPL edition. Follow the

Unsaved buffer warning when switching files/buffers

谁都会走 提交于 2019-11-30 02:42:35
I am using FuzzyFinder with vim to open files and switch between buffers. It works like a charm except when the current file I am working on has some changes. Vim wouldn't let me switch the buffer till I save it: "E37: No write since last change (add ! to override)". Is there a way of suppressing this warning unless I am quitting the editor? All I want to do it switch to a different buffer for referencing some code and switch back. James I think you can use :set hidden . Use the :set hidden option and vim will hide the buffer until you come back to it. You can also use :set confirm to deal

Make Geany recognize additional file extensions

断了今生、忘了曾经 提交于 2019-11-30 02:40:40
问题 My default Geany installation on Debian does not recognize some file types out of the box. How can I add extensions, using the same syntax highlighting as other known extensions for simplicity's sake? In the current case, I'd like Geany to open all .aspx files with the same highlighting as .html files. 回答1: Use inside the menu Tools->Configuration files->filetype_extensions.conf. This will allow you to configure the filetypes based on suffix for your user. 回答2: Just add new extensions in /usr

Is there a plugin for vim to auto-import python libraries? [closed]

喜你入骨 提交于 2019-11-30 00:23:39
In eclipse you can hit Ctrl+Shift+o to automatically import all the libraries you reference in your code. Is there any similar plugin for vim to have this feature with python? There is ropevim . It is available on pypi as well The autoimport (adds missing imports) and organizeimport (reorder imports) features work well, but it is a little invasive at times (it will create a .ropeproject folder in your project). Rope code completion is also quite good so I use standard code completion with tab, and when it's not enough, I use ctrl-space to use ropevim autocompletion. Here are some of my

Wrapping selecting text in enclosing characters in Emacs

爱⌒轻易说出口 提交于 2019-11-30 00:04:39
In Textmate I can wrap enclosing characters ('(', '[', '"', etc.) around text by selecting it and hitting the opening character. For example, if I select word and hit ( , it will become (word) . What does Emacs call this feature and how do I enable it? For parens you can do M-( . For brackets/braces/quotes you could do: (global-set-key (kbd "M-[") 'insert-pair) (global-set-key (kbd "M-{") 'insert-pair) (global-set-key (kbd "M-\"") 'insert-pair) Note that if you don't have a region highlighted, it will just insert the pair of whatevers and put the cursor in between them. Also handy for deleting

How to change Sublime Text 2 selected tab color

半腔热情 提交于 2019-11-29 21:21:11
I like the Sublime Text 2 default color scheme Monokai alot. The only problem is the tab colors, the selected tabs and the rest of the tabs all look the same (almost). How can I change only the selected tab color for this theme. You need to dig pretty deep into theme customization to do that: Since your theme is Monokai (medium-dark) go to "Packages/Theme - Default/Default.sublime-theme" From lines 528 to 531 are your answers... Either you hack by changing tint_modifier or layer2.opacity OR You go right at "medium_dark_unselected_tab_bg2.png" and try changing it by "light_unselected_tab_bg2

In Eclipse, how do I replace a character by a new line?

一曲冷凌霜 提交于 2019-11-29 21:10:13
In Eclipse 3.3.2, I would like to replace a character (say ',') by a new line in a file. What should I write in the "Replace with" box in order to do so ? EDIT : Many answers seems to be for Eclipse 3.4. Is there a solution for Eclipse 3.3.X ? Check box 'Regular Expressions' and use '\R' in the 'Replace with' box It's a new feature introduced with Eclipse 3.4, See What's New in 3.4 Check box 'Regular Expressions' and use '\n' in the 'Replace with' box Like the others said, just use regular expression, but instead of just \r, put \r\n I'm using Helios and it works, however I had some issues

Navigating in Vim's Command Mode

别说谁变了你拦得住时间么 提交于 2019-11-29 20:14:49
I am a long time emacs user learning Vim. Emacs lets me navigate in the mini-buffer (where I issue commands like C-x C-s) using the same navigation keyboard shortcuts as in any other buffer. For example, I can navigate forward one character using C-f, even while in the mini-buffer. I could also use the arrow keys, but they are too far away. Is there any keyboard shortcut to navigate in Vim's command mode (:), without using the arrow keys -- equivalent to emacs C-f, C-b? Thanks. Boldewyn Adding to Greg Hewgill's answer, you can use q: to open the command-line window, where you have any Vim

Why use monospace fonts in your IDE? [closed]

烂漫一生 提交于 2019-11-29 20:14:20
I've seen a couple of font topics on SO and it seems a majority of people use monospace fonts for programming tasks. I have been using Verdana for programming for a couple of years and I really like the enhanced readability, without missing anything monospace related. Why do you use a monospace font? Dan I've never even considered coding in a proportional font before. So in the interests of science I just switched my editor over to give it a go. Here are a few observations after fixing a couple of easy tickets: Code seems extremely dense. Most of my code is around 80 columns, rarely over 100.