firefly avatar firefly committed 0e133b3

More fancy updates!

Comments (0)

Files changed (7)

 
     key <AC01> { [         a,          A,           ae,           AE ]	};
     key <AC02> { [         o,          O,       oslash,       Oslash ]	};
-    key <AC03> { [         e,          E,    parenleft,           at ]	};
-    key <AC04> { [         u,          U,   parenright,           at ]	};
+    key <AC03> { [         e,          E,          Tab,           at ]	};
+    key <AC04> { [         u,          U, ISO_Left_Tab,           at ]	};
     key <AC05> { [         i,          I,     infinity,           at ]	};
     key <AC06> { [         d,          D,           at,           at ]	};
     // TODO: make sure that e.g. altgr+shift+h gets interpreted as Shift+Left
 // ┃       ┃     │     │     │     │     │     │     │     │     │     │ ;   │ ^ ^ ┃       ┃
 // ┃ Tab   ┃ å   │ ä   │ ö € │ p   │ y   │ f   │ g ∘ │ c   │ r   │ l → │ , √ │ ¨ ~ ┃       ┃
 // ┣━━━━━━━┻┱────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┺┓  CR  ┃
-// ┃ (Esc)  ┃   Æ │   Ø │     │     │     │     │     │     │     │     │ _   │ * × ┃      ┃
-// ┃ Ctrl_L ┃ a æ │ o ø │ e ( │ u ) │ i ∞ │ d   │ h ← │ t ↓ │ n ↑ │ s → │ -   │ '   ┃      ┃
+// ┃ (Esc)  ┃   Æ │   Ø │  RTb│     │     │     │     │     │     │     │ _   │ * × ┃      ┃
+// ┃ Ctrl_L ┃ a æ │ o ø │ e Tb│ u   │ i ∞ │ d   │ h ← │ t ↓ │ n ↑ │ s → │ -   │ '   ┃      ┃
 // ┣━━━━━━━┳┹────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┲┷━━━━━┻━━━━━━┫
 // ┃       ┃ >   │ :   │     │     │     │     │     │     │     │     │     ┃             ┃
 // ┃ Shift ┃ < | │ . · │ q   │ j ↓ │ k ↑ │ x   │ b   │ m µ │ w   │ v   │ z   ┃             ┃
 #  export TERM=rxvt-unicode-256color
 #fi
 
+export GREP_OPTIONS='-P --color=auto'
+export GREP_COLORS='cx=37'
+
 export PATH="$PATH:$HOME/bin:$HOME/node_modules/.bin:$HOME/.cabal/bin"
 
 export DEVKITPRO="/opt/devkitpro"
 export GTK_IM_MODULE=ibus
 export QT_IM_MODULE=ibus
 
+
 ### Utility variables
 export brightness="/sys/class/backlight/intel_backlight/brightness"
 
 
 ## Aliases
 try_alias  ls    ls --color=auto
-try_alias  grep  grep -P --color=auto
+#try_alias  grep  grep -P --color=auto
 try_alias  sed   ssed -R
 #try_export PAGER "/usr/share/vim/vim73/macros/less.sh"
 try_export PAGER "$HOME/.vim/macros/less.sh"
 # `less` is in my muscle memory...
 #alias less=$PAGER
 
+# aliases for programs relying on termcap/terminfo for detecting 256-color
+# support.
+alias tmux=TERM=xterm-256color\ tmux
+
 alias ..="cd .."
 alias ...="cd ../.."
 alias ....="cd ../../.."
 bind-key k  select-pane -U
 bind-key l  select-pane -R
 
+set-option -g default-terminal "screen-256color"

vim/syntax/lecnote.vim

 \           start="\S\@<=\*\*\|\*\*\S\@="  end="\S\@<=\*\*\|\*\*\S\@="
 
 
+"""" General """"""""""""""""""""""""""""""""""""""""""""""""""""""""
+syn region  lectureForeignBlock    concealends  keepend
+\           start="{{{\?"             end="}}}\?"  contains=@lectureForeignBlocks
+
+"""" Logic proofs """""""""""""""""""""""""""""""""""""""""""""""""""
+syn include @logicImport           syntax/logic.vim
+syn region  lectureLogicBlock      concealends
+\           start="{{{\?\s*logic"     end="}}}\?"  contains=@logicImport
+
+
 """" Other general-purpose formatting """""""""""""""""""""""""""""""
 syn match   lectureProperty        "^\s*[A-ZÅÄÖa-zåäö0-9_*]\+: "
 \           contains=markdownItalic,markdownBold
 
 
 """" Mappings """""""""""""""""""""""""""""""""""""""""""""""""""""""
-let mapleader = ","
+"let mapleader = ","
+let mapleader = " "
 
 " Bind C-h to fully dedent (clear all leading whitespace)
 noremap  <C-h> :s/^\s*//<CR>
 set list listchars=tab:»\ ,trail:·,nbsp:␣,extends:$,precedes:^
 set fillchars=vert:│"╎║┃
 
+set foldmethod=marker
+
 if version >= 703
   set colorcolumn=+1            " Highlight column after the `textwidth`th one
 end
 syntax on                       " Use syntax highlighting
 
 " Add a few custom filetypes
-au BufRead,BufNewFile {*.json}               set ft=javascript
-au BufRead,BufNewFile {/usr/share/X11/xkb/*} set ft=c
-au BufRead,BufNewFile {*.md}                 set ft=markdown
+au BufRead,BufNewFile {*.json}               setfiletype javascript
+au BufRead,BufNewFile {/usr/share/X11/xkb/*} setfiletype c
+au BufRead,BufNewFile {*.md}                 setfiletype markdown
 
-au BufRead,BufNewFile {*.lecnote}            set ft=lecnote
-au BufRead,BufNewFile {*.selfml}             set ft=selfml
-au BufRead,BufNewFile {*.todo,todo}          set ft=todo
-au BufRead            {*/xchatlogs/*.log}    set ft=irclog readonly
+au BufRead,BufNewFile {*.lecnote}            setfiletype lecnote
+au BufRead,BufNewFile {*.selfml}             setfiletype selfml
+au BufRead,BufNewFile {*.todo,todo}          setfiletype todo
+au BufRead            {*/xchatlogs/*.log}    setfiletype irclog | set readonly nomodifiable
 
 " Add custom filetype-dependent metadata
 au FileType lua  setlocal comments=:--
 
 
 """" Colour scheme """"""""""""""""""""""""""""""""""""""""""""""""""
-if $TERM != "linux" && $TERM != "screen"
+if $TERM == "xterm"
+  " assume 256-colour terminal
   set t_Co=256
 end
+"if $TERM != "linux" && $TERM != "screen"
+"  set t_Co=256
+"end
 
 "color Tomorrow-Night-Bright-ff
 let g:jellybeans_background_color_256="NONE"
 let g:jellybeans_overrides =
 \     { 'CursorLine'   : { '256ctermbg' : '234'  }
-\     , 'StatusLine'   : { 'attr'       : 'bold'
-\                        , '256ctermfg' : '253'
-\                        , '256ctermbg' : '233'
-\                        }
-\     , 'StatusLineNC' : { '256ctermfg' : '250'
+\     , 'StatusLine'   : {
+\                          '256ctermfg' : '3'
+\                        , '256ctermbg' : '233'  }
+\     , 'StatusLineNC' : { '256ctermfg' : '242'
 \                        , '256ctermbg' : '233'  }
 \     , 'ColorColumn'  : { '256ctermbg' : '233'  }
 \     , 'LineNr'       : { '256ctermfg' : '238'  }
-\     , 'CursorLineNr' : { '256ctermfg' : '3'    }
+\     , 'CursorLineNr' : { '256ctermfg' : '3'
+\                        , '256ctermbg' : '234'  }
 \     , 'Conceal'      : { '256ctermfg' : '14'
 \                        , '256ctermbg' : 'NONE' }
 \     , 'ModeMsg'      : { 'attr'       : 'bold'
 \                        , '256ctermfg' : '2'    }
 \     }
+"\                          '256ctermfg' : '253'
 color jellybeans
 
 
 
 
 """" Status line """"""""""""""""""""""""""""""""""""""""""""""""""""
-set laststatus=1                " Only display status line if >1 window
+"set laststatus=1                " Only display status line if >1 window
+set laststatus=2                " Never mind.  Always display status line.
+
+hi User1 ctermfg=3 ctermbg=235
+hi User2 ctermfg=3
 
 set statusline=
 set statusline+=%<              " truncation location marker
-set statusline+=%f              " filename
-set statusline+=\ %h%m%r        " space, flags (help?, edited?, readonly?)
+set statusline+=%1*             " --> gray bg
+set statusline+=%f\             " filename, space
+set statusline+=%*              " <-- regular bg
+set statusline+=%y%m%r          " space, info (filetype, edited?, readonly?)
 set statusline+=%=              " spacer <==>
-set statusline+=[%2n]\          " 2-char buffer#, space
-set statusline+=%-14.(%l,%c%V%) " 14-char group of line# & col#
+set statusline+=[%2n]\          " 2-char bufno, space
+set statusline+=%-8.(%l,%c%V%)  " group of line# & col#
 set statusline+=\ %P            " space, percentage in file
 
-" Make the ruler also display the buffer#
-set rulerformat=%23([%2n]\ %-14.(%l,%c%V%)\ %P%)
+" Make the ruler also display the bufno
+set rulerformat=%2*[%2n]\ %-8.(%l,%c%V%)\ %P
 
 
 """ Dump files to web server """"""""""""""""""""""""""""""""""""""""
 
 "" TODO
 " nnoremap S diw"0P
+
+
+""" temp
+"if !exists("*JumpToNotesWindow")
+"  fun JumpToNotesWindow()
+"    let l=line(".")
+"    exe "normal \<C-w>l" . l . "G"
+"  endf
+"
+"  noremap <C-x>  :call JumpToNotesWindow()<CR>
+"endif
+
 #
 
 #(sleep 10 && dropboxd) &			# launch dropboxd as user.
-xbindkeys                           # xbindkeys (bind fn keys)
+#(sleep 5 && xbindkeys) &            # xbindkeys (bind fn keys)
 #xcape                               # lets Ctrl act as Esc if not held.
 pulseaudio --start                  # mmm, pulseaudio
-(sleep 5 && xcape)
+#(sleep 5 && xcape) &
+
+xbacklight = 0
+
+(sleep 5 &&
+  setxkbmap se-ff
+  xbindkeys
+  xcape
+) &
 
 #(sleep 10 && kmail) &
 
 
 ### Setup prompt
 #PROMPT="%{$fg[$prompt_color]%}%n@%m%{$reset_color%} %~ %# "
-RPROMPT="[%{$fg[yellow]%}%?%{$reset_color%}]"
+#RPROMPT="[%{$fg[yellow]%}%?%{$reset_color%}]"
 PS2="» "
 
+esc="$(echo -e '\e')"
+up="${esc}[A"
+down="${esc}[B"
+
 ### Setup prompt
 PROMPT="%{$fg[$prompt_color]%}%n@%m%{$reset_color%} %~
 %# "
+RPROMPT="%{$up%}[%{$fg[yellow]%}%?%{$reset_color%}%{]$down%}"
 
 ### Alternative prompt (two-line prompt)
 #PROMPT="%{$fg[grey]%}╭╴%{$fg[$prompt_color]%}%n@%m%{$reset_color%} %~
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.