Which do you prefer?

Discussion in 'Mac Programming' started by Meitou, Sep 5, 2012.

  1. Meitou macrumors member

    Joined:
    Aug 25, 2012
    #1
    I'm starting to python and was just wondering which editor I should use to code. emacs, or something else? I'm not including xcode because I heard it was difficult to learn. Side question about my Macbook, where are the vents that air comes out from? I placed my hand on the front hinges and I feel absolutely no air coming out of them.
     
  2. rien333 macrumors regular

    Joined:
    Jun 29, 2010
    Location:
    The Netherlands
    #2
    There lots of good (and some free) text editors for Python around. My personal favorites include Smultron, (about $3 in the App store, and has some sort of free version named "Fraise"), TextWrangler (Free, but maybe a bit to much) and Vim (included on your system, but a bit 'hardcore'). You can also take a look at this, seems like quite a good list:http://wiki.python.org/moin/PythonEditors
    Good luck learning how to code!
     
  3. charlieegan3 macrumors 68020

    charlieegan3

    Joined:
    Feb 16, 2012
    Location:
    U.K
  4. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #4
    I use MacVim for Python programming (in fact I use it for all programming :)) but as mentioned above there are many other alternatives if Vim is too complex. BBEdit would be my choice if I couldn't use MacVim for some reason.
     
  5. mslide, Sep 6, 2012
    Last edited: Sep 6, 2012

    mslide macrumors 6502a

    Joined:
    Sep 17, 2007
    #5
    Vim (MacVim on a Mac). Yes, it has a very steep learning curve but worth the effort if you program a lot, especially professionally.

    Emacs is my second choice. Also has a steep learning curve but beginners will find it a lot easier to do the basics when compared to vi(m) due to vi(m) being a modal text editor. Everything else is a distant third.

    Master one of those and you'll grow to hate having to move your hand away from the keyboard to use the mouse :)

    Tip: Remap your caps lock key to something useful. Your pinky will thank you. For emacs, remap it to control. For vim, either control or escape. I prefer escape but I know a lot of vi(m) users who prefer control.

    PS this applies to all text editing/programming needs, not just python
     
  6. robvas macrumors 68020

    Joined:
    Mar 29, 2009
    Location:
    USA
    #6
    Komodo
    TextWrangler/BBEdit
    TextMate
    SublimeText
    vim/MacVim
    AquaMacs or Emacs for OS X
    Chocolat

    etc
     
  7. Meitou, Sep 6, 2012
    Last edited: Sep 6, 2012

    Meitou thread starter macrumors member

    Joined:
    Aug 25, 2012
    #7
    I've used Vim on Ubuntu but it came with syntax highlighting. How do I enable this on my MBP? I read that you have to go and change the files using Sudo vim vimrc. Is this the only way? Syntax is available for PHP coding but not python... what should I do?
     
  8. minifridge1138 macrumors 6502a

    Joined:
    Jun 26, 2010
    #8
    vi is a good program to know because practically every linux machine you ever come across will have vi installed.

    For python, have you tried idle?
     
  9. Meitou thread starter macrumors member

    Joined:
    Aug 25, 2012
    #9
    I used the wrong extension. Now I have another question, how do I access my vimrc file? It's not located in ~/.vimrc.
     
  10. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #10
    Paste this command-line into a Terminal window:
    Code:
    touch ~/.vimrc
    
    The file should now exist.
     
  11. Meitou thread starter macrumors member

    Joined:
    Aug 25, 2012
    #11
    isn't the touch command similar to the vi command? I want to access the vimrc terminal in order to permanently enable syntax in vim.
     
  12. throAU macrumors 601

    throAU

    Joined:
    Feb 13, 2012
    Location:
    Perth, Western Australia
    #12
    Use whatever editor you are comfortable with.... but if you don't yet have a plain text editor you like...

    Textwrangler is free and provides many language syntax highlighting options.



    edit:
    Dunno if i'd suggest Vim to a noob Mac programmer. Vi variants are not exactly user friendly, and the dude is learning to code, don't waste time learning an editor at the same time.

    By all means learn vim/vi/nvi/whatever vi clone you prefer at some point; i'm a vi user myself, but i think if you're wanting to focus on learning to code, focus on learning to code, that will be enough to deal with for the time being without learning an editor with input and command mode at the same time :D
     
  13. mslide, Sep 10, 2012
    Last edited: Sep 10, 2012

    mslide macrumors 6502a

    Joined:
    Sep 17, 2007
    #13
    Using touch isn't appropriate here and no it's not the same as vi. 'touch' is a unix command that simply "touches" a file and vi(m) is a text editor. touch is used to either create an empty file or update its modification time. Read touch's man page for more info (i.e. open Terminal and type "man touch", you can move around man pages using the same keybindings you use to move around a text file in vi).

    ~/.vimrc won't exist by default. You create the file. Just use vi to create the file (don't need to 'touch' it first). Open Terminal and type "vi ~/.vimrc" at the prompt. Hit the 'i' key, type "syntax on", then hit ":wq" to save and quit.
     

Share This Page