"Ненужные" приложения
1 (defun open-cfg () 2 "Правка основного конфига" 3 (interactive) 4 (if (equal (buffer-name) ".emacs") 5 (load "~/.emacs") 6 (find-file "~/.emacs"))) 7 (defun insert-date () 8 "Insert current date yyyy-mm-dd H:M:S." 9 (interactive) 10 (insert (format-time-string "%a %d.%m %H:%M")))Здесь определены 2 функции, которые я использую наиболее часто: открытие основного [этого] конфигурационного файла для правки и перезагрузки*, и формат timestamp`а.
11 (global-set-key (kbd "<escape>") 'keyboard-escape-quit) 12 (global-set-key (kbd " <f1>") 'open-cfg) 13 (global-set-key (kbd " "<f3>") 'next-match) 14 (global-set-key (kbd " <f9>") 'shell) 15 (global-set-key (kbd " <f12>") 'kill-emacs) 16 (global-set-key (kbd "C-f") 'isearch-forward-regexp) 17 (global-set-key (kbd "C-а") 'isearch-forward-regexp) 18 (global-set-key (kbd "C-z") 'undo) 19 (global-set-key (kbd "C-я") 'undo) 20 (global-set-key [mode-line mouse-5] 'next-buffer) 21 (global-set-key [mode-line mouse-4] 'previous-buffer) 22 (global-set-key [C-tab] 'delete-window)
23 (load-theme ' fogus t) 24 (custom-set-faces 25 '(default ((t (:family "Droid Sans" :height 150))))) 26 (custom-set-variables 27 '(delete-selection-mode nil) 28 '(desktop-save-mode nil) 29 '(double-click-time 1000) 30 '(inhibit-startup-buffer-menu t) 31 '(inhibit-startup-screen t))Выбран шрифт-по-умолчанию "Droid Sans 15" и тема "Fogus".
32 (kill-buffer "*scratch*") 33 (kill-buffer "*Messages*") 34 (windmove-default-keybindings 'meta) 35 (fset 'yes-or-no-p 'y-or-n-p) 62 (setq make-backup-files nil) 63 (setq auto-save-default nil)Отучаем Emacs от излишеств и навязчивости ;) Кажется, все понятно без комментариев.
64 (defalias 'dec 'org-decrypt-entry) 65 (defalias 'lf 'load-file) 66 (defalias 'lm 'list-matching-lines) 67 (defalias 'tag 'org-set-tags-command) 68 (defalias 'sel 'org-tags-sparse-tree) 69 (defalias 'abb 'abbrev-mode) 70 (defalias 'gt 'goto-line)
71 (setq default-mode-line-format 72 (list "" 73 'mode-line-buffer-identification 74 'mode-line-modes 75 " | Cut: Ctrl+w Paste: Ctrl+y Goto [gt]" 76 ))Опять же убран ненужная мне индикация положения курсора ("точки" по терминологии Emacs) в документе и на первое время добавлена справка по клавиатурным комбинациям, которые я постоянно забывал))
(require 'easymenu)
(easy-menu-define words-menu global-map
"Меню пользователя"
'("[Actions]"
["Decrypt" org-decrypt-entry]
["+ Tag" org-set-tags-command]
["Tag =" org-tags-sparse-tree]
["Вставить дату" insert-date]
["Быстрый поиск" isearch-forward-regexp]
["Орфография" flyspell-mode]
["Cтроки содержащие" list-matching-lines]
))
/* Auto-hide bookmarks toolbar */
#PersonalToolbar {
visibility: collapse !important;
}
#navigator-toolbox:hover > #PersonalToolbar {
visibility: visible !important;
}
Добавить в файл ~/.mozilla/firefox/<profile-name>/chrome/userChrome.css
« checkinstall has been dropped for future distributions and won't get fixed for 13.1 as the is absolutely no upstream maintenance anymore and no reaction to mails »
shopt -s extglob cp -R ~/файлопомойка/!(исключение1|исключение2|*ние3) назначение- допустимо использование шаблона "*"
xfce4-popup- [Tab]
#!/bin/sh if [ -n "$1" ] then title="$1" item="$2" else title=Dmenu item="hello!" # Example: "First\nSecond\nOther" fi dmenu_command=/path/to/dmenu while ps ax | grep $dmenu_command | grep -v grep > /dev/null do sleep 2 done echo -e "$item" | $dmenu_command -fn "SansMono:pixelsize=15" -nb "#222222" -sf "#eeeeee" -nf "#bbbbbb" -p "$title" exit 0
(dmenu-notify First &); sleep 1; dmenu-notify Second

a=M; ls -Ra ~ 2>/dev/null | egrep -io ~/".?$a[A-Za-z\.-]*" | uniqДовольно забавно на мой взгляд. Т. е. идея в том, чтобы отрезать у вывода ls часть от начала до нужного совпадения, а от совпадения до первого "/", для исключения подпапок из результата. Данная строка скорее всего выведет что-то вроде
cat ~/.Xresources ... !============================== ! Emacs !============================== emcs.geometry: 71x33Не стоит забывать про олдскул ;) Все параметры моего любимого Xterm задаются в этом же файле кстати.
python setup.py bdist_rpm
> fgr --help Usage : fgr [OPTIONS] Options: [-vVPrMACaiIyLcwxZ] [-fpotkhsmudgeE]] [Path] fgr: Locate documents and folders on this computer by name or content Filter:Search for files Contents:File's contents filtered as plain text. -v Verbose output debugging mode. -V Show version information Filter Details -a Stay on single filesystem -P Print... The unique Process ID that identifies this process. -D Find hidden files and directories -f Filter To display files which pass the filter (stars and regexps will be processed) -r Recursive -s +KByte is greater than or equal to (KB): KByte -s -KByte is less than or equal to (KB): KByte -p suid | exe Set UID(suid) | Executable Text Files (exe) -o octal The permissions of the file, in octal notation. -t Type any | reg | dir | sym | sock | blk | chr | fifo Any (any) Default type Regular file (reg) Directory (dir) Symbolic Link (sym) UNIX Socket (sock) Block device (blk) Character device (chr) FIFO (fifo) -k Minutes Details: TIME (Previous): Minutes [--> -M | -C | -A] -h Hours Details: TIME (Previous): Hours [--> -M | -C | -A] -d Days Details: TIME (Previous): Days [--> -M | -C | -A] -m Month Details: TIME (Previous): Month(s) [--> -M | -C | -A] -M TIME Modification Time :TIME (mknod, truncate, utime, write) -A TIME Access Time :TIME (exec, mknod, pipe, utime, read) -C TIME Creation Time :TIME (chown, chgrp, chmod, ln) -u uid User: uid -g gid Group: gid -Z Output a zero byte (the ASCII NULL character) instead of the character that normally follows a file name Content View: -------- -e STRING Regular expression: STRING -E STRING Regular expression(Extended): STRING -i Ignore case -I Text Files -L No match -c Line Count -w Whole words only -x Match whole lines only fgr-4.7.4 Copyright (c) 2002-2010 Edscott Wilson Garcia. GPL distribution licence.

(defalias 'cal 'calendar) (defalias 'tag 'org-set-tags-command)Похоже на какую-то vim-ересь?)) Но набор короткого алиаса по количеству нажатий практически равноценен запуску команды с помощью дефолтной многокнопочной комбинации, а вот с точки зрения мнемоники явно удобнее.
;;; Org Mode
;; GNU Emacs 24.3.1
(add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" . org-mode))
;; старт в org-mode дя файлов *.org *.txt
(require 'org)
(setq org-tag-alist '(
("cfg" . ?c)
("notes" . ?n)
("quick" . ?q)))
;; predefined tags
;;;
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cb" 'org-iswitchb)
(global-set-key (kbd "") 'org-agenda)
(global-set-key (kbd "") 'org-cycle-agenda-files)
(global-set-key (kbd "") 'keyboard-quit)
(global-set-key (kbd "\C-z") 'undo)
;; а вот и Ctrl+Z
(load-theme 'zenburn t)
(windmove-default-keybindings 'meta)
;; теперь навигация будет проходить следущим образом: alt+arrow keys
(fset 'yes-or-no-p 'y-or-n-p)
;; замена "yes" на "y" и т. д.
(desktop-save-mode t)
;; сохранять сессию
(custom-set-variables
'(delete-selection-mode nil)
'(mark-even-if-inactive t)
'(org-agenda-files (quote ("~/path/to/file.org")))
'(scroll-bar-mode nil)
;; disable scrollbar
'(show-paren-mode t)
'(transient-mark-mode 1))
(custom-set-faces
'(default ((t (:family "Droid Sans" :height 150)))))
;; дефолтный шрифт Droid Sans 15
(kill-buffer "*scratch*")
Следующие Предыдущие Главная страница