Which do you prefer?

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

  1. Meitou macrumors member

    Aug 25, 2012
    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

    Jun 29, 2010
    The Netherlands
    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


    Feb 16, 2012
  4. Cromulent macrumors 603


    Oct 2, 2006
    The Land of Hope and Glory
    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

    Sep 17, 2007
    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 68030

    Mar 29, 2009
    AquaMacs or Emacs for OS X

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

    Meitou thread starter macrumors member

    Aug 25, 2012
    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

    Jun 26, 2010
    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

    Aug 25, 2012
    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

    Aug 9, 2009
    Sailing beyond the sunset
    Paste this command-line into a Terminal window:
    touch ~/.vimrc
    The file should now exist.
  11. Meitou thread starter macrumors member

    Aug 25, 2012
    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


    Feb 13, 2012
    Perth, Western Australia
    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.

    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

    Sep 17, 2007
    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