Results 1 to 18 of 18
  1.    #1  
    Is there a way to figure out what line number your cursor is on when changing code other than physically counting the lines? I use wordpad to make modifications, maybe that is the problem...
  2. #2  
    install "nano" on the pre and do it right from there, control-c will get you the current line number inside the app.

    - D2G
  3. #3  
    +1 for nano
  4. intro's Avatar
    Posts
    172 Posts
    Global Posts
    174 Global Posts
    #4  
    be legit use vi the line counter is right there
    --
    Please post inquiries to the "Ask a Sprint rep" sticky on the CDMA North America forum.
    If my post was helpful please thank me!

    Linux/Palm Pre HELP can be found at:
    http://www.crombiez.com

    -intro.
  5. rmbwebs's Avatar
    Posts
    129 Posts
    Global Posts
    145 Global Posts
    #5  
    The easy answer is to use a text editor that doesn't suck.

    Side note to that: editing right on the pre is better, and if you are coming from wordpad you might be more comfortable in nano than vi
  6. RickNY's Avatar
    Posts
    254 Posts
    Global Posts
    319 Global Posts
    #6  
    But really -- if you plan on doing any kind of work on *nix-like things -- do yourself justice and learn how to do the most basic things in vi.. Trust me, one day you'll end up having to work on something, and the only editor you'll have available will be vi.. You can either know how to use it -- or look like an ***** trying to figure it out while someone is standing over your shoulder (::cough:: not that I had that happen)

    To turn line numbers on in vi:

    Code:
    :set number
  7. #7  
    Quote Originally Posted by intro View Post
    be legit use vi the line counter is right there
    Quote Originally Posted by RickNY View Post
    But really -- if you plan on doing any kind of work on *nix-like things -- do yourself justice and learn how to do the most basic things in vi.. Trust me, one day you'll end up having to work on something, and the only editor you'll have available will be vi.. You can either know how to use it -- or look like an ***** trying to figure it out while someone is standing over your shoulder (::cough:: not that I had that happen)
    ++1 to you both!
  8. #8  
    vi is a great editor i have learned to like it. hated it at first haha but have found it to be very useful there is a list of commands on the pre dev wiki about it but it tells you what line you are one
  9. #9  
    ok...how do i install vi?

    edit just read this post, got some questions answered:
    http://forums.precentral.net/web-os-...mand-line.html
    Last edited by trim81; 07/14/2009 at 04:00 AM.
  10. #10  
    In vi:

    :set number (to turn on)
    :set nonumber (to turn off)
    :101 (to go to, for example, line 101)


    BTW, vi is already installed on the Pre, which is why it is useful. You can get it on windows as part of Cygwin, but that's a lot of trouble to go through to get a cryptic editor
  11. #11  
    I think most people that prefer vi over nano or pico are just making themselves like it since it's there by default. Crappy editor IMO.
  12. #12  
    Quote Originally Posted by AnOutsider View Post
    I think most people that prefer vi over nano or pico are just making themselves like it since it's there by default. Crappy editor IMO.
    Well, opinions vary. I know some people who swear by it...and have used it for literally decades. It is fairly powerful if you know it's tricks. It also has the advantage that it is pretty much installed on any *nix-based system that you may find yourself using. Folks like me end up having to deal with many such systems during the course of the day...and some of them I may log into only once or twice to do something and then may not ever be back on that box. Thus, installing a different editor isn't really practical...so you get to know vi and, after awhile, stop hating it so much.

    That said, it definitely has a ramp-up time, lots of cryptic key combos, and is not targeted at the GUI generation. There are much better choices for those folks...and folks who only need to work on a finite number of *nix-based systems.
  13. tcbeutler's Avatar
    Posts
    62 Posts
    Global Posts
    66 Global Posts
    #13  
    visual studio 2008? Comes with all the standard DOM intellisense, and has a lot of standard functionalities, even in JSJSJS.
  14. #14  
    but let's mention another thing.

    If the original poster wants to do work ON HIS WINDOWS BOX like write programs and such, he (or she) needs to get a text-editor on his windows box that doesn't suck AND DISPLAYS LINE NUMBERS.

    Personally, I like Crimson Editor. Multi-Edit is also nice. There -are- vi and emacs implementations for windows, but they're a little heavy for newbies....

    Homepage of Crimson Editor - Free Text Editor, Html Editor, Programmers Editor for Windows

    Another good alternative in a light-weight editor for windows is notepad++

    .:: NOTEPAD++ ::.
  15. nhavar's Avatar
    Posts
    285 Posts
    Global Posts
    293 Global Posts
    #15  
    Try Aptana or even Eclipse with the Web Toolkit.
  16. #16  
    I use Notepad++ and like it for this purpose.
  17. #17  
    I use TextPad and seems to work perfectly fine for me. I have heard of Firebug keeping files organized, or Visual Studio as well. I'd like something that keeps the files organized as well as allowing the functionality.

    Any opinions?
  18. Webby_s's Avatar
    Posts
    279 Posts
    Global Posts
    284 Global Posts
    #18  
    I have to usually :set number in vi every time I root, not a problem. But then I enter edit (i) and hit esc when finished and I loose the line number count even with doing the :set number, until I enter vi again. It just has [Modified] in the corner. Why can't line count come back?

    Thoughts?

    After thinking about it is it because it's modified and vi can't count the lines once it's been tweaked?

Posting Permissions