Skip to content

Instantly share code, notes, and snippets.

View kclem's full-sized avatar

Kendell Clement kclem

View GitHub Profile
" Put this in your ~/.vimrc
" Define the function to reverse complement a DNA sequence
" Run by calling <Leader>rc from normal mode. By default <Leader> is "\" so press \rc (you only have 1 second after \ to press rc)
function! ReverseComplement()
" Save the current cursor position
let save_cursor = getpos('.')
" Get the word under the cursor
let word = expand('<cword>')