THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
license: gpl-3.0 |
function mycd() | |
{ | |
#if this directory is writable then write to directory-based history file | |
#otherwise write history in the usual home-based history file | |
tmpDir=$PWD | |
echo "#"`date '+%s'` >> $HISTFILE | |
echo $USER' has exited '$PWD' for '$@ >> $HISTFILE | |
builtin cd "$@" # do actual cd | |
if [ -w $PWD ]; then export HISTFILE="$PWD/.dir_bash_history"; touch $HISTFILE; chmod --silent 777 $HISTFILE; | |
else export HISTFILE="$HOME/.bash_history"; |
import org.eclipse.jetty.server.Server | |
import org.eclipse.jetty.servlet.{DefaultServlet, ServletContextHandler} | |
import org.eclipse.jetty.server.nio.SelectChannelConnector | |
import net.liftweb.http.LiftFilter | |
object JettyLauncher extends App { | |
// Slightly modified from | |
// https://github.com/ghostm/lift_blank_heroku | |
// to change Application to App | |
// Original version was modified based on the |
" Next and Last {{{ | |
" Motion for "next/last object". "Last" here means "previous", not "final". | |
" Unfortunately the "p" motion was already taken for paragraphs. | |
" | |
" Next acts on the next object of the given type in the current line, last acts | |
" on the previous object of the given type in the current line. | |
" | |
" Currently only works for (, [, {, b, r, B, ', and ". | |
" |
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
! | |
! Invert number row | |
! | |
! This changes the behavior of keys in the number row, but does not | |
! affect the number pad. | |
! | |
keycode 10 = exclam 1 1 exclam | |
keycode 11 = at 2 2 at | |
keycode 12 = numbersign 3 3 numbersign | |
keycode 13 = dollar 4 4 dollar |
; This code is hereby released by its author (Per Vognsen) into the public domain. | |
; It's mostly a proof of concept though it was surprisingly usable for how simple it was to code. | |
; If you want to use it as a starting point for a more polished package, go right ahead. | |
(require 'cl) | |
(defstruct wm-window buffer (point 0) (start 0) (hscroll 0) dedicated) | |
(defvar wm-windows) | |
(defvar wm-windows-alist) |
" Notes: | |
" (1) To enhance the ergonomics of this sufficiently to make it practical, at | |
" least, until your brain grows a new lobe dedicated to counting line offsets | |
" in the background while you work, you should either make sure you have | |
" something like the following in your `~/.vimrc`: | |
" | |
" set number | |
" if has('autocmd') | |
" augroup vimrc_linenumbering | |
" autocmd! |
Searching can be an efficient way to navigate the current buffer.
The first search commands we learn are usually /
and ?
. These are seriously cool, especially with the incsearch
option enabled which lets us keep typing to refine our search pattern. /
and ?
really shine when all we want is to jump to something we already have our eyeballs on but they are not fit for every situation: