News for hackers. Stuff that matters.
Re:Hackers' Screenshots by DarkShikari on Thursday August 07, 2008 @08:34PM (#270171)
My usual desktop; a Cygwin development environment, Notepad++ for editing, PuTTY connected to a remote shell for my IRC, and Elecard Streameye for video stream analysis.

http://img381.imageshack.us/img381/5126/hackerdesktopyu3.png

Re:Hackers' Screenshots by joshwa on Thursday August 07, 2008 @08:39PM (#270176)
gahhh comic sans comments!
Re:Hackers' Screenshots by tptacek on Thursday August 07, 2008 @08:42PM (#270179)
OW MY BRAIN. He also line wraps source code.
Re:Hackers' Screenshots by DarkShikari on Thursday August 07, 2008 @08:49PM (#270184)
I'm too lazy to change the defaults on the fonts. Blame the Notepad++ guys. And I rarely notice the comment issue that you pointed out... as sadly most of the code I work on is sorely lacking in comments.

The line wrapping isn't an issue because I usually make it much wider, and if when its wider there's still line wrapping, the person who wrote such code should probably be forced to endure great pain. Most programs I work on have a "please don't make 250-character-lines" policy, for good reason.

Re:Hackers' Screenshots by tptacek on Thursday August 07, 2008 @08:51PM (#270186)
What do you like about Notepad++?
Re:Hackers' Screenshots by DarkShikari on Thursday August 07, 2008 @08:54PM (#270190)
Split-screen editing (of the same file even; most editors don't let me split-screen edit the same file in two different windows), automatic syntax highlighting, bracket-matching (the standard stuff), tabbed editing, and the various built-in tools.

I do sometimes use vim, but I find that a simple tabbed GUI text editor gives me the most productivity. I've never liked IDEs, especially since I would rather just type "make" than try to use an internal build system. Add to this the fact that both my company and all my personal projects are based on the GNU toolset in some form or another.

Re:Hackers' Screenshots by tmallen on Thursday August 07, 2008 @10:06PM (#270222)
Split screen with same file

:vsp

Syntax highlighting

:syntax on

Tabs

:tabnew

Bracket matching

:inoremap ( ()

:inoremap [ []

:inoremap { {}

And so many built-in tools...you really should take another look. I use TextMate on my Mac to churn out massive amounts of HTML, but any other editing happens in (G)Vim.

Re:Hackers' Screenshots by avinashv on Friday August 08, 2008 @07:43AM (#270447)
Before you go overwriting pretty useful default functionality, check Vim's manual for what those do to see if it isn't more useful (I prefer the defaults).
Re:Hackers' Screenshots by thomasmallen on Friday August 08, 2008 @09:54AM (#270521)
What part of the help docs is about brace/parentheses matching? Everything I've seen online uses a simple key mapping like the ones I posted.
Re:Hackers' Screenshots by avinashv on Friday August 08, 2008 @07:21PM (#271162)
No idea, but I don't find that useful. I use :set showmatch, and a plugin called UnMtchBracket.vim (IIRC) that highlights any currently unmatched brackets.

This is pretty personal, so I guess it's something you may want to at least give a try.

Re:Hackers' Screenshots by coliveira on Friday August 08, 2008 @10:09AM (#270533)
use :set showmatch
Re:Hackers' Screenshots by thomasmallen on Friday August 08, 2008 @11:21AM (#270596)
Showmatch is there to highlight matching braces, not to insert them. The mappings actually match your braces by writing the close brace/parens/bracket. Here are the coding aids from my vimrc. They're pretty simple, as I don't like to change how Vim works too much:

  " Coding aids
  set undolevels=5000
  set backspace=indent,eol,start
  vnoremap < <gv
  vnoremap > >gv
  " Braces, etc.
  inoremap ( ()<LEFT>
  inoremap (<CR> (<CR>)<ESC>O
  inoremap () ()
  inoremap { {}<LEFT>
  inoremap {<CR> {<CR>}<Esc>O
  inoremap {{ {
  inoremap [ []<LEFT>
  inoremap [<CR> [<CR>]<Esc>O
  inoremap [] []
  " Wrap in braces, etc.
  vnoremap -( <ESC>`>a)<ESC>`<i(<ESC>
  vnoremap -[ <ESC>`>a]<ESC>`<i[<ESC>
  vnoremap -{ <ESC>`>a}<ESC>`<i{<ESC>
  vnoremap -" <ESC>`>a"<ESC>`<i"<ESC>
  vnoremap -' <ESC>`>a'<ESC>`<i'<ESC>
  " End the line, adding a semicolon
  inoremap <S-CR> <ESC>A;<ESC>o
  noremap <S-CR> A;<ESC>j

I also use NERDCommenter for quick commenting, an XML tag wrapper script, and a tag closer script. As you can see above, typing the open/close pair doesn't result in "())", and typing an open brace plus a carriage return automatically adds the close brace to the line below, in the format:

  function hello($name) {
      // Insertion point
  }
Edit: Of course, that isn't my entire .vimrc
Re:Hackers' Screenshots by rfunduk on Friday August 08, 2008 @01:06PM (#270738)
Give E-TextEditor a try if you're stuck on Windows.

http://www.e-texteditor.com/

Re:Hackers' Screenshots by slacker on Thursday August 07, 2008 @09:25PM (#270205)
Also Vim support tabs ':tabnew some_file'. 'gt' and 'gT' to switch between them. Even more, you can split several files in each tab.
Re:Hackers' Screenshots by nailer on Thursday August 07, 2008 @09:54PM (#270216)
Why wouldn't you wrap source? OK, ideally it's better not to have overly long lines, but if you do, why bother horizontally scrolling?
Re:Hackers' Screenshots by anewaccountname on Thursday August 07, 2008 @10:40PM (#270238)
>Why wouldn't you wrap source?

Line endings have significance in some languages. Even in languages where they don't, it can confuse you by looking like the end of an indentation level.

Re:Hackers' Screenshots by nailer on Friday August 08, 2008 @12:21AM (#270269)
> it can confuse you by looking like the end of an indentation level.

It shouldn't - any competent editor should have no line number on the area it wraps round.

Re:Hackers' Screenshots by DougBTX on Friday August 08, 2008 @08:27PM (#271204)
It means you can't scan down the left hand side of the editor looking at indentation, you've got to double check with the existence/non-existence of line numbers. For the same reason that it is easier to read left-aligned text than it is to read right-aligned text, though not quite as bad since not all lines are "wrong".
Re:Hackers' Screenshots by aquateen on Thursday August 07, 2008 @08:57PM (#270193)
What's wrong with comic sans? Haven't seen that complaint before.
Re:Hackers' Screenshots by tptacek on Thursday August 07, 2008 @08:58PM (#270194)
Re:Hackers' Screenshots by silentbicycle on Friday August 08, 2008 @12:21AM (#270270)
Re:Hackers' Screenshots by nailer on Thursday August 07, 2008 @08:54PM (#270189)
For Windows, try Poderosa rather than Putty - it's got tabs.