[Tutor] wanting to learn

bhaaluu bhaaluu at gmail.com
Thu Jun 12 03:24:20 CEST 2008


On Wed, Jun 11, 2008 at 11:16 AM, W W <srilyk at gmail.com> wrote:
>
> However, my personal preference is using vi/vim (which you should have
> built in on your mac, along with python).
>
> If you open a mac terminal window and type "vimtutor" at the prompt,
> it should start the vim tutor program. There are many programmers
> across various different programming languages and platforms that use
> vi/vim as their ide.
>
> That's my personal recommendation, and at the very least you should
> give a few different editors/IDEs a try to see which one fits your
> style/comfort zone best.
>
> HTH,
> Wayne

I also use vim as an IDE for Python.
vim == vi improved.
Here is the (dot)vimrc (.vimrc) I use:

" .vimrc
"
" Created by Jeff Elkner 23 January 2006
" Last modified 2 February 2006
"
" Turn on syntax highlighting and autoindenting
syntax enable
filetype indent on
" set autoindent width to 4 spaces (see
" http://www.vim.org/tips/tip.php?tip_id=83)
set et
set sw=4
set smarttab
" set line number (added by bhaaluu)
set nu
" Bind <f2> key to running the python interpreter on the currently active
" file.  (courtesy of Steve Howell from email dated 1 Feb 2006).
map <f2> :w\|!python %<cr>

That turns on syntax highlighting, autoindenting, line numbers,
and allows you to press the F2 function key to run your code from vim,
then returns you to the editor afterwards. Use 'print' and 'raw_input()'
to watch variables and establish breakpoints.

vim is touch-typist friendly, so you can really go to town if you know it.
'vimtutor' is a good starting point if you're not familiar with it. You can
do a lot with it, with just a handful of commands. Then add to those
as you need them. Edit multiple files in multiple windows... whatever
you want to do, and more!

There are two modes in vim: normal and insert. <Esc> will always
get you into normal mode. 8^D

Happy Programming!
-- 
b h a a l u u at g m a i l dot c o m
Kid on Bus: What are you gonna do today, Napoleon?
Napoleon Dynamite: Whatever I feel like I wanna do. Gosh!


More information about the Tutor mailing list