Here’s a typcial scenario: I use Putty SSH into my University’s unix system, bring up screen and then proceed to do whatever work I have to do. Often this involves using Vim to write code or edit documents. Over the summer the CS department upgraded a bunch of their software - including upgrading Vim to Vim 7. Starting classes again I went to do my usual routine and found that the Arrow Keys in Vim under Screen would insert characters instead of moving the cursor. A solution was harder to find than I thought it should, so I’m posting it here:
Problem: Log into your unix/linux/solaris/whatever account and bring up screen. Launch Vim and in insert mode use the arrow keys to move your cursor. Up arrow inserts 0A or A, Down arrow inserts B, etc.
Solution: The best solution I found was this one which instructs you to use:
:set term=builtin_ansi
which I dropped into my .vimrc file. There are more solutions involving remapping keys, setting macros and tons of other over-the-top kind of stuff. Why its only problem in Putty using Screen (I’ve tested some other permutations) is beyond me.
While on the topic of Vim, if you’re using Windows you might want to check out intellisense for Vim, two of my favorite things.
**EDIT**
Ok, that doesn’t really solve the problem AND it disables syntax coloring. The problem, I’ve discovered, is that Vim is reading it’s terminal setting from Screen and using ’screen’ as it’s terminal type. Instead you’ll want to set it to xterm. I recommend adding:
set term=xterm
to your .vimrc
For my birthday last year my wonderful family gave me an iPod Touch. Some feel its the red-headed step child of the iPhone family, but I think its wonderful. Its like having an iPhone without the phone bill. The first thing that I did, after marveling at the touch screen and its amazing interface is, was to jailbreak it. I wont go into details (use the google) but its essentially modifying the firmware on the device so that you can run 3rd party applications natively. Why would you want to do that? you might ask. Tons of reasons. Some of the great ones are:
SwapLibrary -Sync your device with multiple libraries (only two actually, but who needs more that that?)
NemusSync - Sync your calendar with your google calendar!
Games! - GemLogic, ParkingLot, Lexitron - enough goodies to fill a 45 minute commute
ruBooks - Use your touch like an ebook reader
I haven’t look into the legality of this but I’m sure its not 100% legit. This is why I’m a big fan of open source. I think the iPod Touch is great, but I’d really like a better ToDo list application. I could either(pre sdk) cross my fingers an hope that apple does something about it or take the law into my hands and jailbreak+write something myself. If the iDevice operating system was open (like linux or BSD or etc…) I could joined the community of active developers, learned a lot of things about a really interesting project and give something back. Ah well, its a dream world where companies write open source software and still make money (or so I’m told).
Anyway, put that economic stimulus package to good use and go buy yourself an iPhone or iPod Touch.
I’ve been taking a computer architecture class where we’ve done some MIPS development and while there’s an IDE available (MIPster) I’ve preferred to do most of the my development in vim. As most of you know Vim is Vi Improved, a text editor that allows you to do all of your editing through keyboard shortcuts and the command line.
I recently ran into an error while using Vim on my university shell account:
E667 Fsync Failed
It turns out that the error was caused by Vim’s inability to write to disk. I had a core dump that was using up most of my disk quota which prevented vim from allocating space to save the file. Once I deleted the dump, freeing up some space, I was good to go.
I’ve been working on an application for work that is to be distributed by Java Web Start (JWS) and I can see what all the fuss is about. I have really gotten into it yet, I hardly know anything actually, but I do know that it makes it incredible easy to distribute an app.
Basically, JWS is a technology that allows you to bundle up a Java app in jars and then bundle it on a web server so that it can be downloaded as needed. Once you’ve downloaded it you can run it locally, but if there is a change to the code on the server JWS will grab the new package and update your app. It combines the mobility of Java applets with a feature rich, locally run Java application.
With all of the convenience of distribution I had a few problems getting it up and running. I’ll qualify that statement with this: I didn’t spend a lot of time reading up on JWS or how to debug it and ultimately it wasn’t really JWS fault that I was having trouble (a logic disconnect between the chair and the keyboard). To solve the problem I enabled the Java console which can be found (in Windows) under Control Panels>Java>Advanced> Enable Console and Enable debugging. My main problem was that the app would download and launch and then hang giving me no errors or wouldn’t display anything. I turned out that there was a problem loading one of the libraries.
To get the full benefit out of JWS I should probably do a lot more reading. What I’ve come across so far has been pretty good, but I’m sure there’s tons more information out there. I’d recommend reading up on JWS over at Sun’s page, there’s Wikipedia of course and there’s a pretty good article over at JavaWorld which gives a good overview of the history and its uses.
Essential
——————
cd - change directory
ls - list directory contents
cp - copy file
mv - move file/rename file
man - show documentation on a command
du - size of directory/file
grep - retrieve text in filecat - print file to screen
tail - print last 10 lines of a file to screen
ln - create a link
tar - pack/unpack archive of a file or directory
ps - list running processes
netstat - show network information
kill, killall - stop a processes
Good To Know
—————————-
sed - string manipulation (insert, delete, find/replace)
top - show memory/cpu usage
df - hard disk usage
screen - create virtual terminals
vim - text editor
diff - compare two files