Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
IDEs?
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Off the Wall
View previous topic :: View next topic  
Author Message
Dr.Willy
Guru
Guru


Joined: 15 Jul 2007
Posts: 352
Location: NRW, Germany

PostPosted: Wed Oct 31, 2012 12:28 am    Post subject: Reply with quote

I generally respect vi(m) for chosing a different approach to editing. After all thinking outside the box is what generates true progress.
I just don't think the modal concept works out and I see no reason to stick to (or jump on) a failed attempt.

It can be used keyboard only? Well that's nice but also true for many editors.
Commands like '5dd' to delete 5 lines seems gimmicky to me: Either I can catch the number of lines (words, …) in one glimpse, then I don't win much by such a command or I have to start counting which is more effort than deleting lines one by one. If I'm editing something and want to jump to the next word, how is <ESC>wa shorter than <CTRL>RightArrow?
And then there's the issue of the hotkeys. To most vim-users I talked to this is the greatest thing since sliced bread. In reality it's just trying to make QWERTY usable. But why would you build on a broken design in the first place?
Back to top
View user's profile Send private message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3209

PostPosted: Wed Oct 31, 2012 2:54 am    Post subject: Reply with quote

5dd kind of stuff is less usefull unless you don't have to count, that is, you want to modify a small number of lines. But this is speaking of vim as vi from 20y ago. In current vim, you use v (select by characters) or ctrl-v (select by blocks) or V (select by lines) to select what you want to modify and then you modify. For instance you can select a block of text and apply the find and replace to this block of text only. It helps if you can write basic regex, since you can do more complicated find and replace. You can change the selection between these three options v/ctrl-v/V mid-way, i.e., you starting selecting by using v, but you changed your mind and wanted ctrl-v, then just press ctrl-v and the selection mode will change. This is just one small example of what an editor should be able to do with ease and save you time by allowing you do handle this kind of repetitive stuff.

If you just want to write text (and not do advanced editing), you might as well just start vim in easy mode (view or gview) and type away.

One thing that is lacking in vim is a good IDE mode. Some other IDEs are filling in this gap, by having a vim mode instead. Then, it is the best of both worlds.
_________________
emerge --quiet redefined | E17 vids: I, II | Now using kde4 :-/
Back to top
View user's profile Send private message
dmitchell
Veteran
Veteran


Joined: 17 May 2003
Posts: 1159
Location: Austin, Texas

PostPosted: Wed Oct 31, 2012 3:01 am    Post subject: Reply with quote

Another approach is ':M,Nd', which deletes lines M through N. You do display line numbers, don't you? You can omit either M or N, and the current line will be used in its place.
_________________
Your argument is invalid.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16117
Location: Colorado

PostPosted: Wed Oct 31, 2012 3:11 am    Post subject: Reply with quote

I thought :M,Nd was something everyone knew who actually tried to use vi*.

I generally have trouble remembering the syntax for search & replace. I can do the basic stuff, can't think of exact situations that are difficult.

I've tried to make note of some useful stuff, but I just don't need most of it very often, so I never remember it.
_________________
lolgov. 'cause where we're going, you don't have civil liberties.

In Loving Memory
1787 - 2008
Back to top
View user's profile Send private message
jonnevers
Veteran
Veteran


Joined: 02 Jan 2003
Posts: 1593
Location: Gentoo64 land

PostPosted: Wed Oct 31, 2012 3:16 am    Post subject: Reply with quote

dmitchell wrote:
Another approach is ':M,Nd', which deletes lines M through N. You do display line numbers, don't you? You can omit either M or N, and the current line will be used in its place.

yes, line # turned on in all editors. i use this .vimrc with a couple small tweaks. http://amix.dk/vim/vimrc.html

a coworker recently introduced me to the :M,N command modifiers, after using vi for well over a decade i never got involved in this sort of file modification. i use the regex find/replace constantly though.

i can't stand when colleagues show code and they have line numbers turned off, in IDEs like eclipse and intellij. it really makes me question their sanity. to review the code, if i need to start with 'please turn on line numbers so we can talk coherently' there's a problem.
Back to top
View user's profile Send private message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3209

PostPosted: Wed Oct 31, 2012 6:25 am    Post subject: Reply with quote

Nope. Line #s are turned off in mine. And I typically use gvim, and it looks like this. :)
_________________
emerge --quiet redefined | E17 vids: I, II | Now using kde4 :-/
Back to top
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1510
Location: St. Wendel

PostPosted: Wed Oct 31, 2012 10:01 am    Post subject: Reply with quote

What about:

Code:
set relativenumber


no more counting
Back to top
View user's profile Send private message
marens
Apprentice
Apprentice


Joined: 05 Aug 2004
Posts: 172

PostPosted: Wed Oct 31, 2012 9:34 pm    Post subject: Reply with quote

py-ro wrote:
What about:

Code:
set relativenumber


no more counting


excellent, didn't know that one
_________________
If English was good enough for Jesus, then it's good enough for you!
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1569
Location: U.S.A.

PostPosted: Wed Oct 31, 2012 9:55 pm    Post subject: Reply with quote

Ever try using ed? It's a fun exercise. See 'info ed'.

Good way to polish your regex skills.
_________________
"The accumulation of all power, legislative, executive, and judiciary in the same hands...may justly be pronounced the very definition of tyranny."
--James Madison, Federalist 46
Back to top
View user's profile Send private message
ichbinsisyphos
Guru
Guru


Joined: 08 Dec 2006
Posts: 547

PostPosted: Wed Nov 14, 2012 7:15 pm    Post subject: Reply with quote

jonnevers wrote:
sublime text
Give this a try if you haven't already. I'm addicted to it :)

It is nagware, though, reminds you to purchase and register repeatedly after a certain number of saves.
I'm not sure if it is worth the $59 to me, but I'm considering it.
Back to top
View user's profile Send private message
McGruff
Tux's lil' helper
Tux's lil' helper


Joined: 28 Dec 2004
Posts: 147

PostPosted: Wed Nov 14, 2012 7:50 pm    Post subject: Reply with quote

Will check that out.
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1569
Location: U.S.A.

PostPosted: Wed Nov 14, 2012 10:16 pm    Post subject: Reply with quote

If anybody is looking for an editor that's a light compromise between a bare-bones editor and a graphical IDE, SciTE is nice. Very easy on the eyes, gtk+, Scintilla-based (fast, pretty, syntax highlighting for about 80 or 90 languages, well-documented API), dozens of configurable key-bindings, set up to plug in your build system, so you can build and run without leaving the editor.

Fast. Worth looking at. Fits a niche.
_________________
"The accumulation of all power, legislative, executive, and judiciary in the same hands...may justly be pronounced the very definition of tyranny."
--James Madison, Federalist 46
Back to top
View user's profile Send private message
wildhorse
Tux's lil' helper
Tux's lil' helper


Joined: 16 Mar 2006
Posts: 148
Location: Estados Unidos De América

PostPosted: Wed Nov 14, 2012 10:47 pm    Post subject: Reply with quote

Alright, let's see what you folks had for dinner: Edlin (another Microsoft product)
Back to top
View user's profile Send private message
piedar
Tux's lil' helper
Tux's lil' helper


Joined: 09 Aug 2010
Posts: 80

PostPosted: Wed Nov 14, 2012 11:28 pm    Post subject: Reply with quote

I'll throw Geany into the mix. It's a lightweight hybrid somewhere between text editor and IDE with tabbed editing and sessions. It's GTK2-based and looks nice in GNOME or XFCE. Synatax highlighting, symbol listing, some basic file management, nice options for auto-indentation, lots of plugins including spell check, GDB support, etc. It has some support for builds and make, though I don't use it - just give me the embedded terminal and I'm happy. I use it for almost all my writing (txt, latex) and coding (Java, bash, Python, C).
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1569
Location: U.S.A.

PostPosted: Thu Nov 15, 2012 2:39 am    Post subject: Reply with quote

wildhorse wrote:
Alright, let's see what you folks had for dinner: Edlin (another Microsoft product)

I remember that fucker. :x
_________________
"The accumulation of all power, legislative, executive, and judiciary in the same hands...may justly be pronounced the very definition of tyranny."
--James Madison, Federalist 46
Back to top
View user's profile Send private message
Shadow Skill
Veteran
Veteran


Joined: 04 Dec 2004
Posts: 1023

PostPosted: Thu Nov 15, 2012 8:06 am    Post subject: Reply with quote

Emacs. Not perfect but better than most of the so-called editors out there. Which is sad since Emacs is a REPL rather than an editor.[/b]

One really neat feature that I need to remind myself to use more often is Narrowing. In Emacs you can select a block of text and make the buffer only show the selected text, with the added benefit that while narrowed all of the text manipulation functions will only apply to the visible text. This kind of thing really shines with languages where functions can get really long or the file very long like the various lisp dialects and Javascript. This particular function is named narrow-to-region. A name that is memorable even if the default binding is not, this is a pattern with Emacs. (That isn't to say that they don't have some ridiculous names for functions in there like hippie-expand.)

I don't bother with trying to remember the bindings for commands I use with frequency beyond the basic stuff like saving files and splitting windows, I can just memorize the whole or a part of the name of a function and move on from there. If I use a given function often enough the binding for it will eventually sink in. If you can't be bothered with the rather odd keybindings you could try something like Ergoemacs which is a set of less weird keybindings for Emacs. If you use Emacs definitely install autocomplete it doesn't analyze code but it provides a convenient interface for word completion based on open files. It is capable of displaying Emacs lisp (and probably other modes with the right configuration) docstrings as a tooltip.

One place where I do think that Emacs really falls down is with editing files that have sections with multiple programming languages in them. Probably the single best plugin available for Emacs that handles a host of these types of things reasonably well is nxhtml but it doesn't have html5 support and it ends up being a sort of omnipresent mode that while not interfering with modes that don't use it, it will slow down Emacs' startup time. It is still significantly faster to startup even with the added load of nxhtml than pretty much every Java IDE I have ever used and Visual Studio which I use frequently.

Go on give it a try, you know you want to.
_________________
Ware wa mutekinari.
Wa ga kage waza ni kanau mono nashi.
Wa ga ichigeki wa mutekinari.

"First there was nothing, so the lord gave us light. There was still nothing, but at least you could see it."
Back to top
View user's profile Send private message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2111

PostPosted: Sat Nov 17, 2012 12:43 am    Post subject: Reply with quote

As for Sublime Text 2, here is an online video course (downloadable) for free.

Topics:
Code:
Hello; Installation and Base Settings; Services and Opening Sublime From the Terminal ; Multiple Cursors and Incremental Search; The Command Palette; Instant File Changing; Symbols; Key Bindings; Installing Plugins Without Package Control; Package Control; Snippets; Your First Snippet; Adding Snippets Through Package Control; Easier Testing With Snippets; Essential Plugins; Zen Coding; Emmet; Cross-Browser CSS With Prefixr; Fetch Files With Ease; Lightning Fast Folder and File Creation; Sidebar Enhancements; Sublime Linter; Sexy Code Snippet Management With Gists; DocBlockr; Pretty Task Management; HTTP Requests Within Sublime; LiveReload; Tips, Techniques and Modifications; Regular Expressions in Sublime; Vintage Mode; Quicker Stylesheet References; Joining Lines; Sublime and Markdown with Marked; All About Projects; Configuring and Mastering Split Windows; Custom Builds
https://tutsplus.com/course/improve-workflow-in-sublime-text-2/
_________________
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
Back to top
View user's profile Send private message
Prenj
n00b
n00b


Joined: 20 Nov 2011
Posts: 13

PostPosted: Sat Nov 17, 2012 1:10 am    Post subject: Reply with quote

Back in the days I coded in anjuta/kate, with all other panels/views closed. Just code view, and terminal for compiling/running stuff. Never saw any reason to distract myself with a fancy/gimmicky editor. Just interrupts the flow of transfering abstracts into code, and you spend lot of time fiddling.

I mean the only thing that is useful in a fancy editor is debugger/trace stuff, and being able to jump to definitions of classes and stuff. Autocomplete is ok, if it works properly, I thought anjuta did it nice.


Last edited by Prenj on Sat Nov 17, 2012 1:50 am; edited 1 time in total
Back to top
View user's profile Send private message
szczerb
Veteran
Veteran


Joined: 24 Feb 2007
Posts: 1646
Location: Poland => Lodz

PostPosted: Sat Nov 17, 2012 1:34 am    Post subject: Reply with quote

Prenj wrote:
I mean the only thing that is useful in a fancy editor is debugger/trace stuff, and being able to jump to definitions of classes and stuff. Autocomplete is ok, if it works properly, I thought anjuta did it nice.
There one more good feature in those-big-IDEs (especially with a large codebase). The call hierarchy of a method/function/variable. (Yeah, using Eclipse at work...)
Back to top
View user's profile Send private message
Prenj
n00b
n00b


Joined: 20 Nov 2011
Posts: 13

PostPosted: Sat Nov 17, 2012 1:49 am    Post subject: Reply with quote

szczerb wrote:
Prenj wrote:
I mean the only thing that is useful in a fancy editor is debugger/trace stuff, and being able to jump to definitions of classes and stuff. Autocomplete is ok, if it works properly, I thought anjuta did it nice.
There one more good feature in those-big-IDEs (especially with a large codebase). The call hierarchy of a method/function/variable. (Yeah, using Eclipse at work...)


True I guess, I was never bothered with it, cos I worked in small team of 3 coders, where each of us had responsibility of our own modules, and we only shared "core" part, which lived different lifestyle of its own :)

But I guess in larger environment where you work with other people's code, it's pretty damn useful.
Back to top
View user's profile Send private message
ichbinsisyphos
Guru
Guru


Joined: 08 Dec 2006
Posts: 547

PostPosted: Tue Nov 27, 2012 11:40 am    Post subject: Reply with quote

I'm working on a more complex fun project right now and I am beginning to lose oversight again :lol:
I just thought what would be great is an editor that splits up the source into classes and functions and presents them in a way similar to a good documentation program, like doxygen or something, where you see what each class, function does, what output it produces, what input it requires and how they interact and where you could then try to find the most effective and readable implementation for each task.
I think this would be pretty much perfect for me.
Back to top
View user's profile Send private message
Prenj
n00b
n00b


Joined: 20 Nov 2011
Posts: 13

PostPosted: Tue Nov 27, 2012 12:13 pm    Post subject: Reply with quote

I think there are IDE's with good class browsers out there, but I can't come up with a name. Google class browser editor?
Back to top
View user's profile Send private message
Crooksey
Apprentice
Apprentice


Joined: 26 Apr 2006
Posts: 239
Location: Vatican City

PostPosted: Tue Nov 27, 2012 12:32 pm    Post subject: Reply with quote

My 6 year old thinkpad runs Eclipse/PyDev with no problems at all, so why people maon about bulky IDE's I have no idea.

I now use Aptana Studio (python web dev)

Its opensource and works great.

If you want to look at another python IDE, everyone always raves about PyCharm, but I refuse to pay for software.
Back to top
View user's profile Send private message
Dr.Willy
Guru
Guru


Joined: 15 Jul 2007
Posts: 352
Location: NRW, Germany

PostPosted: Tue Nov 27, 2012 12:42 pm    Post subject: Reply with quote

ichbinsisyphos wrote:
I'm working on a more complex fun project right now and I am beginning to lose oversight again :lol:
I just thought what would be great is an editor that splits up the source into classes and functions and presents them in a way similar to a good documentation program, like doxygen or something, where you see what each class, function does, what output it produces, what input it requires and how they interact and where you could then try to find the most effective and readable implementation for each task.
I think this would be pretty much perfect for me.

If we're talking java, then eclipse does that.
Back to top
View user's profile Send private message
juniper
l33t
l33t


Joined: 22 Oct 2004
Posts: 758
Location: EU

PostPosted: Wed Nov 28, 2012 2:30 pm    Post subject: Reply with quote

ichbinsisyphos wrote:
Sublime Text looks good. It's not opensource, though.

Btw, I'm already over Vim again, what a stupid idea :lol:


vim is addictive. It's the only editor i use. once you get the hang of it everything else will piss you off. I used to use emacs years ago, but there was this one machine I had to use and the only editor on it of substance was vim. but then I got so used to using vim I ditched emacs.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Off the Wall All times are GMT
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum