Posts

Showing posts from September, 2010

Perfect Cut Copy Paste With Gvim

If you've ever wanted to copy and paste in Gvim with standard windows hotkeys using the system clipboard, just put the following in your .vimrc file.  I've seen several tips similar to this one, but the copy and pasting often comes out slightly wrong.  I guarantee these commands to work exactly how you'd expect. vmap <C-c> "+yi vmap <C-x> "+c vmap <C-v> c<ESC>"+p imap <C-v> <ESC>"+pa Explanation: 1) Copy - When text is highlighted (Visual Mode), Ctrl-C will copy the highlighted text to the + register (system clipboard). 2) Cut - When text is highlighted, Ctrl-X will cut the highlighted text. 3) Paste (visual), When text is highlighted, Ctrl-V will paste over the currently highlighted text. 4) Paste (insert), When in insert mode, Ctrl-V will paste. NOTE: There is no command to paste text while in normal mode.  This is because Ctrl-V is reserved for Blockwise Visual Mode, and also because it's completely...

Setting up Dropbox on a Windows 7/Ubuntu Dual Boot System

Image
The easiest way to set up Dropbox on a dual boot system is to install it on both systems and have a separate Dropbox folder for each OS, it was made for sharing files after all!  But if you're some sort of conservationist hippie then having two copies of all your files might just be unacceptable for you.  If you fall into this category, read on. Having Windows 7 and Ubuntu share a single Dropbox is very simple.  In fact it should work for any version of Windows and Linux that can install the Dropbox software, and it can be set up on any system where both Windows and Ubuntu can share part of the hard drive.  Most commonly this will be a shared NTFS or FAT32 partition, but it will also work if Ubuntu mounts the Windows partition directly.  This method should work no matter what. Dropbox shared between Windows 7 and Ubuntu Virtual Machine 1) Install Dropbox on Windows 7 First boot up Windows, get the dropbox software from https://www.dropbox.com/install ,...

Running Windows 7 and Ubuntu 10.04 without Dual Booting

Image
I just built myself a nice new computer (Core i7, 8 gigs of ram, USB 3.0 ports, etc.), and the first thing I did was create a typical Dual-Boot setup for Windows 7 and Ubuntu 10.04.  I need to use Windows for Microsoft Office, and I prefer it for multimedia applications, but I use Linux for all of my coding projects.  And although I love Ubuntu, I feel that Windows 7 provides a better experience overall (auto-resizing windows by dragging them to the sides of the screen can't be beat).  On my laptop I would usually boot into Ubuntu, but I would have to think about what I wanted to do every time I turned on my computer and make a choice.  Was there a better way?  Only a few hours after setting up my entire system I decided to start over and try virtualization. When you use virtualization software such as VMware Player (which I ultimately decided on)  you're essentially running one operating system, the "Guest OS" inside of your main operating system, the "H...