Skip to content

Instantly share code, notes, and snippets.

View hinrik's full-sized avatar

Hinrik Örn Sigurðsson hinrik

View GitHub Profile
(require 'xterm-title)
(xterm-title-mode 1)
(defun my-xterm-title ()
"A hook function to update the xterm title. Attached to `post-command-hook'"
(let* ((fn (buffer-file-name))
(fnd (file-name-directory fn))
(dir-part (substring fnd 0 (- (length fnd) 1)))
(file-part (substring fn (1+ (length dir-part)) (length fn))))
(cond ((buffer-file-name) (setq xterm-title-frame-title-format (list (getenv
"USERNAME") "@" (system-name) ": " file-part " (" dir-part ")")))
--- /usr/share/vim/vim72/scripts.vim 2009-09-02 17:44:04.710028064 +0000
+++ scripts.vim 2009-09-02 16:15:49.482060392 +0000
@@ -100,7 +100,11 @@
elseif s:name =~ 'lua'
set ft=lua
- " Perl
+ " Perl 6
+ elseif s:name =~ 'perl6'
+ set ft=perl6
--- /usr/share/vim/vim72/filetype.vim 2009-09-02 18:49:03.650027278 +0000
+++ filetype.vim 2009-09-02 18:48:51.730210021 +0000
@@ -1264,6 +1264,7 @@
au BufNewFile,BufRead *.pl call s:FTpl()
endif
au BufNewFile,BufRead *.plx setf perl
+au BufNewFile,BufRead *.p6 setf perl6
func! s:FTpl()
if exists("g:filetype_pl")
" Vim color file
" Filename: define_all
" Maintainer: Hinrik Örn Sigurðsson <hinrik.sig at gmail dot com>
" Installation: Drop this file in your $VIMRUNTIME/colors/ directory
"
" This is a dummy color file that defines a color for every syntax class.
if version > 580
" no guarantees for version 5.8 and below,
" but this makes it stop complaining