From 1bfaf59a20f79b9604eeeb6ddb7b7cadce8c61fb Mon Sep 17 00:00:00 2001 From: Ambrevar Date: Wed, 15 Aug 2012 14:21:25 +0100 Subject: [PATCH] Emacs: updated yasnippet, worked out snippets. --- .arch-pkg-aur-zeus | 3 - .arch-pkg-explicit-zeus | 26 +------- .arch-pkg-official-zeus | 59 +++++++------------ .cmus/autosave | 2 +- .emacs | 19 ++++-- .../snippets/text-mode/cc-mode/c-mode/fopen | 3 - .../snippets/text-mode/cc-mode/c-mode/printf | 6 -- .../plugins/yas/snippets/text-mode/cc-mode/do | 6 -- .../yas/snippets/text-mode/cc-mode/else | 6 -- .../plugins/yas/snippets/text-mode/cc-mode/if | 6 -- .../yas/snippets/text-mode/cc-mode/inc | 3 - .../yas/snippets/text-mode/cc-mode/inc.1 | 3 - .../yas/snippets/text-mode/cc-mode/struct | 6 -- .../yas/snippets/text-mode/cc-mode/while | 6 -- .../yas/snippets/text-mode/sh-mode/for | 5 -- .emacs.d/snippets/c-mode/.yas-parents | 1 + .emacs.d/snippets/c-mode/fopen | 4 ++ .../cc-mode => snippets}/c-mode/fprintf | 3 +- .emacs.d/snippets/c-mode/printf | 7 +++ .emacs.d/snippets/cc-mode/.yas-parents | 1 + .emacs.d/snippets/cc-mode/do | 7 +++ .emacs.d/snippets/cc-mode/else | 7 +++ .../text-mode => snippets}/cc-mode/for | 3 +- .../text-mode => snippets}/cc-mode/fun | 0 .emacs.d/snippets/cc-mode/if | 7 +++ .emacs.d/snippets/cc-mode/inc | 4 ++ .emacs.d/snippets/cc-mode/inc.1 | 4 ++ .../text-mode => snippets}/cc-mode/main | 3 +- .../text-mode => snippets}/cc-mode/once | 3 +- .emacs.d/snippets/cc-mode/struct | 7 +++ .../text-mode => snippets}/cc-mode/switch | 3 +- .emacs.d/snippets/cc-mode/while | 7 +++ .emacs.d/snippets/latex-mode/.yas-parents | 1 + .../latex-mode/abstract.yasnippet | 2 +- .../latex-mode/article.yasnippet | 2 +- .../latex-mode/beamer.yasnippet | 6 +- .../text-mode => snippets}/latex-mode/begin | 0 .../latex-mode/begin.yasnippet | 0 .../latex-mode/bib.yasnippet | 0 .../latex-mode/big.yasnippet | 0 .../latex-mode/bigop.yasnippet | 0 .../latex-mode/binom.yasnippet | 0 .../latex-mode/block.yasnippet | 0 .../latex-mode/bold.yasnippet | 0 .../latex-mode/case.yasnippet | 0 .../latex-mode/cha.yasnippet | 0 .../latex-mode/chastar.yasnippet | 0 .../latex-mode/cite.yasnippet | 0 .../latex-mode/coprod.yasnippet | 0 .../latex-mode/desc.yasnippet | 0 .../latex-mode/doc.yasnippet | 0 .../latex-mode/em.yasnippet | 0 .../latex-mode/enum.yasnippet | 0 .../latex-mode/eq.yasnippet | 0 .../latex-mode/eqs.yasnippet | 0 .../latex-mode/fig.yasnippet | 0 .../latex-mode/frac.yasnippet | 0 .../latex-mode/frame.yasnippet | 0 .../latex-mode/graphics.yasnippet | 0 .../latex-mode/href.yasnippet | 0 .../latex-mode/int.yasnippet | 0 .../latex-mode/it.yasnippet | 0 .../latex-mode/item.yasnippet | 0 .../latex-mode/label.yasnippet | 0 .../latex-mode/letter.yasnippet | 0 .../latex-mode/lim.yasnippet | 0 .../latex-mode/math.yasnippet | 0 .../latex-mode/matrix.yasnippet | 0 .../latex-mode/minipage.yasnippet | 0 .../latex-mode/par.yasnippet | 0 .../latex-mode/prod.yasnippet | 0 .../latex-mode/ref.yasnippet | 0 .../latex-mode/sec.yasnippet | 0 .../latex-mode/secstar.yasnippet | 0 .../latex-mode/ssub.yasnippet | 0 .../latex-mode/ssubstar.yasnippet | 0 .../latex-mode/sub.yasnippet | 0 .../latex-mode/subfig.yasnippet | 0 .../latex-mode/substar.yasnippet | 0 .../latex-mode/sum.yasnippet | 0 .../latex-mode/table.yasnippet | 0 .../latex-mode/url.yasnippet | 0 .../latex-mode/use.yasnippet | 0 .../latex-mode/verb.yasnippet | 0 .emacs.d/snippets/sh-mode/.yas-parents | 1 + .emacs.d/snippets/sh-mode/for | 6 ++ .../text-mode => snippets}/sh-mode/fun | 3 +- .emacs.d/snippets/sh-mode/getopt | 33 +++++++++++ .emacs.d/snippets/sh-mode/help | 12 ++++ .../text-mode => snippets}/sh-mode/if | 3 +- .emacs.d/snippets/sh-mode/while | 6 ++ .emacs.d/snippets/text-mode/email | 4 ++ .emacs.d/snippets/text-mode/time | 4 ++ .save | 1 + .shell.d/funs_rc | 1 + .xinitrc | 14 +---- README | 4 ++ 97 files changed, 189 insertions(+), 144 deletions(-) delete mode 100644 .emacs.d/plugins/yas/snippets/text-mode/cc-mode/c-mode/fopen delete mode 100644 .emacs.d/plugins/yas/snippets/text-mode/cc-mode/c-mode/printf delete mode 100644 .emacs.d/plugins/yas/snippets/text-mode/cc-mode/do delete mode 100644 .emacs.d/plugins/yas/snippets/text-mode/cc-mode/else delete mode 100644 .emacs.d/plugins/yas/snippets/text-mode/cc-mode/if delete mode 100644 .emacs.d/plugins/yas/snippets/text-mode/cc-mode/inc delete mode 100644 .emacs.d/plugins/yas/snippets/text-mode/cc-mode/inc.1 delete mode 100644 .emacs.d/plugins/yas/snippets/text-mode/cc-mode/struct delete mode 100644 .emacs.d/plugins/yas/snippets/text-mode/cc-mode/while delete mode 100644 .emacs.d/plugins/yas/snippets/text-mode/sh-mode/for create mode 100644 .emacs.d/snippets/c-mode/.yas-parents create mode 100644 .emacs.d/snippets/c-mode/fopen rename .emacs.d/{plugins/yas/snippets/text-mode/cc-mode => snippets}/c-mode/fprintf (63%) create mode 100644 .emacs.d/snippets/c-mode/printf create mode 100644 .emacs.d/snippets/cc-mode/.yas-parents create mode 100644 .emacs.d/snippets/cc-mode/do create mode 100644 .emacs.d/snippets/cc-mode/else rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/cc-mode/for (52%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/cc-mode/fun (100%) create mode 100644 .emacs.d/snippets/cc-mode/if create mode 100644 .emacs.d/snippets/cc-mode/inc create mode 100644 .emacs.d/snippets/cc-mode/inc.1 rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/cc-mode/main (55%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/cc-mode/once (63%) create mode 100644 .emacs.d/snippets/cc-mode/struct rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/cc-mode/switch (60%) create mode 100644 .emacs.d/snippets/cc-mode/while create mode 100644 .emacs.d/snippets/latex-mode/.yas-parents rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/abstract.yasnippet (81%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/article.yasnippet (99%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/beamer.yasnippet (96%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/begin (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/begin.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/bib.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/big.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/bigop.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/binom.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/block.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/bold.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/case.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/cha.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/chastar.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/cite.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/coprod.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/desc.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/doc.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/em.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/enum.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/eq.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/eqs.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/fig.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/frac.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/frame.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/graphics.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/href.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/int.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/it.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/item.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/label.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/letter.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/lim.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/math.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/matrix.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/minipage.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/par.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/prod.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/ref.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/sec.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/secstar.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/ssub.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/ssubstar.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/sub.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/subfig.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/substar.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/sum.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/table.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/url.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/use.yasnippet (100%) rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/latex-mode/verb.yasnippet (100%) create mode 100644 .emacs.d/snippets/sh-mode/.yas-parents create mode 100644 .emacs.d/snippets/sh-mode/for rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/sh-mode/fun (54%) create mode 100644 .emacs.d/snippets/sh-mode/getopt create mode 100644 .emacs.d/snippets/sh-mode/help rename .emacs.d/{plugins/yas/snippets/text-mode => snippets}/sh-mode/if (51%) create mode 100644 .emacs.d/snippets/sh-mode/while create mode 100644 .emacs.d/snippets/text-mode/email create mode 100644 .emacs.d/snippets/text-mode/time diff --git a/.arch-pkg-aur-zeus b/.arch-pkg-aur-zeus index 740ad5c8..21b173d4 100644 --- a/.arch-pkg-aur-zeus +++ b/.arch-pkg-aur-zeus @@ -6,12 +6,9 @@ emacs-mediawiki-bzr emacs-yasnippet fortune-mod-tbbt grub -gsharkdown handbrake-cli-svn handbrake-svn -mongoose movgrab -openmw-git package-query pacman-color rxvt-unicode-patched diff --git a/.arch-pkg-explicit-zeus b/.arch-pkg-explicit-zeus index 3f29df5d..c9189b87 100644 --- a/.arch-pkg-explicit-zeus +++ b/.arch-pkg-explicit-zeus @@ -18,6 +18,7 @@ bustle bzip2 calc catdvi +clementine cmus coreutils cpufrequtils @@ -54,7 +55,6 @@ fortune-mod fortune-mod-tbbt gawk gcc -gcc-go gcc-libs gcolor2 gdb @@ -62,21 +62,17 @@ gettext gimp git glibc -gnuchess gnu-netcat gnuplot -go grep grub gsasl -gsharkdown -gtk3 +gstreamer0.10-ugly-plugins gzip handbrake-cli-svn handbrake-svn hdparm heirloom-mailx -help2man highlight hplip htop @@ -87,21 +83,15 @@ initscripts inkscape iptables iputils -irssi ispell -jansson jfsutils -js less libmicrohttpd libtool licenses -lighttpd -links linux linux-lts logrotate -ltrace luakit lvm2 m4 @@ -111,9 +101,6 @@ man-pages mdadm mediainfo mencoder -mercurial -mesa-demos -mongoose movgrab mplayer2 mtools @@ -124,7 +111,6 @@ net-tools nmap ntfs-3g numlockx -openmw-git openssh p7zip package-query @@ -154,7 +140,6 @@ sed shadow slock splint -strace sudo sxiv sysfsutils @@ -163,11 +148,8 @@ sysvinit tar task tcc -tcpdump -texi2html texinfo texlive-dummy -tig trash-cli tree unrar @@ -180,15 +162,11 @@ util-linux valgrind vi vicious -vim vlock w3m -weechat wget which wireless_tools -wireshark-cli -wireshark-gtk wpa_supplicant wv xf86-input-synaptics diff --git a/.arch-pkg-official-zeus b/.arch-pkg-official-zeus index 2ecc192a..c1729696 100644 --- a/.arch-pkg-official-zeus +++ b/.arch-pkg-official-zeus @@ -25,8 +25,6 @@ bash bc binutils bison -boost-libs -bullet bzip2 ca-certificates cairo @@ -35,6 +33,7 @@ calc catdvi cdparanoia cifs-utils +clementine cloog cmus colord @@ -55,6 +54,7 @@ db dbus dbus-core dbus-glib +dconf desktop-file-utils device-mapper d-feet @@ -71,7 +71,6 @@ dri2proto dtach e2fsprogs eject -elfutils emacs-lua-mode emacs-nox enca @@ -102,14 +101,12 @@ foomatic-db-engine foomatic-filters fortune-mod freeglut -freeimage freetype2 fribidi fuse gawk gc gcc -gcc-go gcc-libs gcolor2 gd @@ -133,12 +130,10 @@ glibmm glib-networking glproto gmp -gnuchess gnu-netcat gnupg gnuplot gnutls -go gpgme gpm grep @@ -154,16 +149,16 @@ gstreamer0.10-bad-plugins gstreamer0.10-base gstreamer0.10-ffmpeg gstreamer0.10-good -gstreamer0.10-python +gstreamer0.10-ugly +gstreamer0.10-ugly-plugins gtk2 -gtk3 gtkmm gtkspell gtk-update-icon-cache +gvfs gzip hdparm heirloom-mailx -help2man hicolor-icon-theme highlight hplip @@ -185,14 +180,11 @@ intel-dri iproute2 iptables iputils -irssi isl ispell jack -jansson jasper jfsutils -js json-c kbd kbproto @@ -242,8 +234,10 @@ libgl libglade libglapi libgme +libgnome-keyring libgpg-error libgphoto2 +libgpod libgsf libgssglue libgusb @@ -251,9 +245,11 @@ libice libid3tag libidn libieee1284 +libimobiledevice libirman libjpeg-turbo libksba +liblastfm libldap liblqr liblrdf @@ -267,6 +263,8 @@ libmodplug libmp4v2 libmpc libmpcdec +libmpeg2 +libmtp libnice libnl libnotify @@ -275,6 +273,7 @@ libogg libpcap libpciaccess libpipeline +libplist libpng libproxy libpulse @@ -283,10 +282,12 @@ libraw1394 librsvg libsamplerate libsasl +libsidplay libsigc++ libsm libsndfile libsoup +libsoup-gnome libspectre libssh2 libsystemd @@ -338,8 +339,6 @@ libxxf86dga libxxf86vm libzen licenses -lighttpd -links linux linux-api-headers linux-firmware @@ -347,7 +346,6 @@ linux-lts lirc-utils logrotate lsof -ltrace lua luafilesystem luajit @@ -361,9 +359,7 @@ mcpp mdadm mediainfo mencoder -mercurial mesa -mesa-demos mime-types mjpegtools mkinitcpio @@ -375,8 +371,8 @@ mplayer2 mtdev mtools musicbrainz +mutagen mutt -mygui nasm ncdu ncurses @@ -389,13 +385,8 @@ nspr nss ntfs-3g numlockx -nvidia-cg-toolkit -ogre -ois -openal opencore-amr openjpeg -openslp openssh openssl orc @@ -415,7 +406,6 @@ pcmciautils pcre perl perl-error -perl-locale-gettext pidgin pinentry pixman @@ -429,6 +419,7 @@ popt ppl ppp procps-ng +protobuf psmisc pth pwsafe @@ -441,10 +432,11 @@ python2-dbus python2-distribute python2-gobject2 python2-udiskie -python-configobj python-dbus-common python-notify -python-pycurl +qca +qca-ossl +qjson qt randrproto ranger @@ -476,29 +468,28 @@ speex splint sqlite startup-notification -strace sudo sxiv sysfsutils syslog-ng systemd-tools sysvinit +taglib talloc tar task tcc -tcpdump tdb -texi2html texinfo -tig tree ttf-dejavu tzdata udisks +udisks2 unrar unzip upx +usbmuxd usbutils util-linux v4l-utils @@ -506,17 +497,12 @@ valgrind vi vicious videoproto -vim -vim-runtime vlock w3m -weechat wget which wildmidi wireless_tools -wireshark-cli -wireshark-gtk wpa_supplicant wv wxgtk @@ -570,4 +556,3 @@ zathura-ps zip zlib zsh -zziplib diff --git a/.cmus/autosave b/.cmus/autosave index 66030092..b590d0d0 100644 --- a/.cmus/autosave +++ b/.cmus/autosave @@ -49,7 +49,7 @@ set mixer.pulse.restore_volume=1 set output_plugin=alsa set passwd= set pl_sort= -set play_library=true +set play_library=false set play_sorted=false set repeat=false set repeat_current=false diff --git a/.emacs b/.emacs index 247a5074..c94faf28 100644 --- a/.emacs +++ b/.emacs @@ -281,6 +281,11 @@ browse-url-browser-function 'browse-url-generic) (let ((fill-column (point-max))) (fill-region (region-beginning) (region-end) nil))) +(defun remove-duplicates () + (interactive) + ((shell-command (echo blah))) +) + ;;============================================================================== ;; Duplicate line ;;============================================================================== @@ -503,16 +508,20 @@ the line." ;; (require 'yasnippet-bundle) ;; Next follows a traditional, yet not-optimized configuration for Yasnippet. -(add-to-list 'load-path "/usr/share/emacs/site-lisp/yas") +;; (add-to-list 'load-path "/usr/share/emacs/site-lisp/yas") (require 'yasnippet) ;; not yasnippet-bundle -(yas/initialize) +(yas-global-mode 1) +;; (yas/initialize) + +(setq yas-snippet-dirs "~/.emacs.d/snippets" ) ;; Personal snippets -(setq yas/root-directory "~/.emacs.d/plugins/yas/snippets" ) +;; (setq yas/root-directory "~/.emacs.d/plugins/yas/snippets" ) ;; Load the snippets -; (yas/load-directory "~/.emacs.d/plugins/yas/snippets") ;; Warning: slow! -(yas/load-directory yas/root-directory) +;; (yas/load-directory "~/.emacs.d/plugins/yas/snippets") ;; Warning: slow! +;; (yas/load-directory yas/root-directory) +(yas-load-directory yas-snippet-dirs) ;;============================================================================== ;; AucTeX diff --git a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/c-mode/fopen b/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/c-mode/fopen deleted file mode 100644 index 044c7430..00000000 --- a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/c-mode/fopen +++ /dev/null @@ -1,3 +0,0 @@ -#name : FILE *fp = fopen(..., ...); -# -- -FILE *${fp} = fopen(${"file"}, "${r}"); diff --git a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/c-mode/printf b/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/c-mode/printf deleted file mode 100644 index c2915d58..00000000 --- a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/c-mode/printf +++ /dev/null @@ -1,6 +0,0 @@ -# -*- mode: snippet -*- -# name : printf -# contributor : joaotavora -# -- -printf ("${1:%s}\\n"${1:$(if (string-match "%" text) ", " "\);") -}$2${1:$(if (string-match "%" text) "\);" "")} \ No newline at end of file diff --git a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/do b/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/do deleted file mode 100644 index 5f7a3136..00000000 --- a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/do +++ /dev/null @@ -1,6 +0,0 @@ -#name : do { ... } while (...) -# -- -do -{ - $0 -} while (${1:condition}); \ No newline at end of file diff --git a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/else b/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/else deleted file mode 100644 index d6ef06dc..00000000 --- a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/else +++ /dev/null @@ -1,6 +0,0 @@ -#name : else { ... } -# -- -else -{ - $0 -} \ No newline at end of file diff --git a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/if b/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/if deleted file mode 100644 index c3fe10de..00000000 --- a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/if +++ /dev/null @@ -1,6 +0,0 @@ -#name : if (...) { ... } -# -- -if (${1:condition}) -{ - $0 -} \ No newline at end of file diff --git a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/inc b/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/inc deleted file mode 100644 index ae333284..00000000 --- a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/inc +++ /dev/null @@ -1,3 +0,0 @@ -#name : #include "..." -# -- -#include "$1" diff --git a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/inc.1 b/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/inc.1 deleted file mode 100644 index 66326cd7..00000000 --- a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/inc.1 +++ /dev/null @@ -1,3 +0,0 @@ -#name : #include <...> -# -- -#include <$1> diff --git a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/struct b/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/struct deleted file mode 100644 index f50dabf6..00000000 --- a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/struct +++ /dev/null @@ -1,6 +0,0 @@ -#name : struct ... { ... } -# -- -struct ${1:name} -{ - $0 -}; \ No newline at end of file diff --git a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/while b/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/while deleted file mode 100644 index 14c6ba64..00000000 --- a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/while +++ /dev/null @@ -1,6 +0,0 @@ -#name : while (...) { ... } -# -- -while (${1:condition}) -{ - $0 -} \ No newline at end of file diff --git a/.emacs.d/plugins/yas/snippets/text-mode/sh-mode/for b/.emacs.d/plugins/yas/snippets/text-mode/sh-mode/for deleted file mode 100644 index 0927e293..00000000 --- a/.emacs.d/plugins/yas/snippets/text-mode/sh-mode/for +++ /dev/null @@ -1,5 +0,0 @@ -#name : for i do done -# -- -for i ; do - $0 -done \ No newline at end of file diff --git a/.emacs.d/snippets/c-mode/.yas-parents b/.emacs.d/snippets/c-mode/.yas-parents new file mode 100644 index 00000000..ce9828bd --- /dev/null +++ b/.emacs.d/snippets/c-mode/.yas-parents @@ -0,0 +1 @@ +cc-mode diff --git a/.emacs.d/snippets/c-mode/fopen b/.emacs.d/snippets/c-mode/fopen new file mode 100644 index 00000000..b3339e42 --- /dev/null +++ b/.emacs.d/snippets/c-mode/fopen @@ -0,0 +1,4 @@ +# name: FILE *fp = fopen(..., ...); +# key: fopen +# -- +FILE *${fp} = fopen(${"file"}, "${r}"); \ No newline at end of file diff --git a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/c-mode/fprintf b/.emacs.d/snippets/c-mode/fprintf similarity index 63% rename from .emacs.d/plugins/yas/snippets/text-mode/cc-mode/c-mode/fprintf rename to .emacs.d/snippets/c-mode/fprintf index 147d472f..8742ccae 100644 --- a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/c-mode/fprintf +++ b/.emacs.d/snippets/c-mode/fprintf @@ -1,6 +1,7 @@ # -*- mode: snippet -*- -# name : fprintf +# name: fprintf # contributor : joaotavora, ambrevar +# key: fprintf # -- fprintf ($1, "${2:%s}\\n"${2:$(if (string-match "%" text) ", " "\);") }$3${2:$(if (string-match "%" text) "\);" "")} \ No newline at end of file diff --git a/.emacs.d/snippets/c-mode/printf b/.emacs.d/snippets/c-mode/printf new file mode 100644 index 00000000..035d07e0 --- /dev/null +++ b/.emacs.d/snippets/c-mode/printf @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: printf +# contributor: joaotavora +# key: printf +# -- +printf ("${1:%s}\\n"${1:$(if (string-match "%" text) "," "\);") +}$2${1:$(if (string-match "%" text) "\);" "")} \ No newline at end of file diff --git a/.emacs.d/snippets/cc-mode/.yas-parents b/.emacs.d/snippets/cc-mode/.yas-parents new file mode 100644 index 00000000..eed5b442 --- /dev/null +++ b/.emacs.d/snippets/cc-mode/.yas-parents @@ -0,0 +1 @@ +text-mode diff --git a/.emacs.d/snippets/cc-mode/do b/.emacs.d/snippets/cc-mode/do new file mode 100644 index 00000000..a42d27f5 --- /dev/null +++ b/.emacs.d/snippets/cc-mode/do @@ -0,0 +1,7 @@ +# name: do { ... } while (...) +# key: do +# -- +do +{ + $0 +} while (${1:condition}); \ No newline at end of file diff --git a/.emacs.d/snippets/cc-mode/else b/.emacs.d/snippets/cc-mode/else new file mode 100644 index 00000000..032f0ab2 --- /dev/null +++ b/.emacs.d/snippets/cc-mode/else @@ -0,0 +1,7 @@ +# name: else { ... } +# key: else +# -- +else +{ + $0 +} \ No newline at end of file diff --git a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/for b/.emacs.d/snippets/cc-mode/for similarity index 52% rename from .emacs.d/plugins/yas/snippets/text-mode/cc-mode/for rename to .emacs.d/snippets/cc-mode/for index 67279774..9039268e 100644 --- a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/for +++ b/.emacs.d/snippets/cc-mode/for @@ -1,4 +1,5 @@ -#name : for (...; ...; ...) { ... } +# name: for (...; ...; ...) { ... } +# key: for # -- for (${1:i = 0}; ${2:i < N}; ${3:i++}) { diff --git a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/fun b/.emacs.d/snippets/cc-mode/fun similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/cc-mode/fun rename to .emacs.d/snippets/cc-mode/fun diff --git a/.emacs.d/snippets/cc-mode/if b/.emacs.d/snippets/cc-mode/if new file mode 100644 index 00000000..5c6a1210 --- /dev/null +++ b/.emacs.d/snippets/cc-mode/if @@ -0,0 +1,7 @@ +# name: if (...) { ... } +# key: if +# -- +if (${1:condition}) +{ + $0 +} \ No newline at end of file diff --git a/.emacs.d/snippets/cc-mode/inc b/.emacs.d/snippets/cc-mode/inc new file mode 100644 index 00000000..9c9ed769 --- /dev/null +++ b/.emacs.d/snippets/cc-mode/inc @@ -0,0 +1,4 @@ +# name: #include "..." +# key: inc +# -- +#include "$1" \ No newline at end of file diff --git a/.emacs.d/snippets/cc-mode/inc.1 b/.emacs.d/snippets/cc-mode/inc.1 new file mode 100644 index 00000000..649cbd97 --- /dev/null +++ b/.emacs.d/snippets/cc-mode/inc.1 @@ -0,0 +1,4 @@ +# name: #include <...> +# key: inc +# -- +#include <$1> \ No newline at end of file diff --git a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/main b/.emacs.d/snippets/cc-mode/main similarity index 55% rename from .emacs.d/plugins/yas/snippets/text-mode/cc-mode/main rename to .emacs.d/snippets/cc-mode/main index 50af4b6a..8089d224 100644 --- a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/main +++ b/.emacs.d/snippets/cc-mode/main @@ -1,4 +1,5 @@ -#name: int main(argc, argv) { ... } +# name: int main(argc, argv) { ... } +# key: main # -- int main(int argc, char** argv) { diff --git a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/once b/.emacs.d/snippets/cc-mode/once similarity index 63% rename from .emacs.d/plugins/yas/snippets/text-mode/cc-mode/once rename to .emacs.d/snippets/cc-mode/once index 1b63c394..ea14f9ac 100644 --- a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/once +++ b/.emacs.d/snippets/cc-mode/once @@ -1,4 +1,5 @@ -#name : #ifndef XXX; #define XXX; #endif +# name: #ifndef XXX; #define XXX; #endif +# key: once # -- #ifndef ${1:_`(upcase (file-name-nondirectory (file-name-sans-extension (buffer-file-name))))`_H_} #define $1 diff --git a/.emacs.d/snippets/cc-mode/struct b/.emacs.d/snippets/cc-mode/struct new file mode 100644 index 00000000..39ddfa80 --- /dev/null +++ b/.emacs.d/snippets/cc-mode/struct @@ -0,0 +1,7 @@ +# name: struct ... { ... } +# key: struct +# -- +struct ${1:name} +{ + $0 +}; \ No newline at end of file diff --git a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/switch b/.emacs.d/snippets/cc-mode/switch similarity index 60% rename from .emacs.d/plugins/yas/snippets/text-mode/cc-mode/switch rename to .emacs.d/snippets/cc-mode/switch index dbb0da1f..542197b6 100644 --- a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/switch +++ b/.emacs.d/snippets/cc-mode/switch @@ -1,4 +1,5 @@ -#name : switch (...) { ... } +# name: switch (...) { ... } +# key: switch # -- switch ($1) { diff --git a/.emacs.d/snippets/cc-mode/while b/.emacs.d/snippets/cc-mode/while new file mode 100644 index 00000000..398c6d2b --- /dev/null +++ b/.emacs.d/snippets/cc-mode/while @@ -0,0 +1,7 @@ +# name : while (...) { ... } +# key: while +# -- +while (${1:condition}) +{ + $0 +} \ No newline at end of file diff --git a/.emacs.d/snippets/latex-mode/.yas-parents b/.emacs.d/snippets/latex-mode/.yas-parents new file mode 100644 index 00000000..eed5b442 --- /dev/null +++ b/.emacs.d/snippets/latex-mode/.yas-parents @@ -0,0 +1 @@ +text-mode diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/abstract.yasnippet b/.emacs.d/snippets/latex-mode/abstract.yasnippet similarity index 81% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/abstract.yasnippet rename to .emacs.d/snippets/latex-mode/abstract.yasnippet index bf05994a..04badc79 100644 --- a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/abstract.yasnippet +++ b/.emacs.d/snippets/latex-mode/abstract.yasnippet @@ -1,6 +1,6 @@ # -*- mode: snippet -*- # contributor : Mads D. Kristensen -# key : abs +# key : abstract # group: sections # name : \abstract # -- diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/article.yasnippet b/.emacs.d/snippets/latex-mode/article.yasnippet similarity index 99% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/article.yasnippet rename to .emacs.d/snippets/latex-mode/article.yasnippet index ac1dad21..daa1add7 100644 --- a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/article.yasnippet +++ b/.emacs.d/snippets/latex-mode/article.yasnippet @@ -2,7 +2,7 @@ # contributor: Mads D. Kristensen # contributor : Song Qiang # contributor : Pierre Neidhardt 2012-03-17 -# key: art +# key: article # group: skeleton # name: \documentclass{article} ... # -- diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/beamer.yasnippet b/.emacs.d/snippets/latex-mode/beamer.yasnippet similarity index 96% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/beamer.yasnippet rename to .emacs.d/snippets/latex-mode/beamer.yasnippet index 9caa478c..722a996a 100644 --- a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/beamer.yasnippet +++ b/.emacs.d/snippets/latex-mode/beamer.yasnippet @@ -1,19 +1,19 @@ # -*- mode: snippet -*- # contributor : Pierre Neidhardt 2012-04-27 -# key: beam +# key: beamer # group: skeleton # name: \documentclass{beamer} ... # -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[xcolor=latex,svgnames,table]{beamer} \usepackage[utf8]{inputenc} -\usepackage[T1]{fontenc} +% \usepackage[T1]{fontenc} % \usepackage{lmodern} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \title{${1:Title}} \subtitle{${2:Subtitle}} -\author{${3:\textcolor{structure.fg!60!white}{\textrm{\textsc{P.~Neidhardt}}}}} +\author{${3:\textcolor{structure.fg!60!white}{P.~Neidhardt}}} \institute{\textcolor{sidebarSection}{${4:Institute}}} \let\latexbak\LaTeX diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/begin b/.emacs.d/snippets/latex-mode/begin similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/begin rename to .emacs.d/snippets/latex-mode/begin diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/begin.yasnippet b/.emacs.d/snippets/latex-mode/begin.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/begin.yasnippet rename to .emacs.d/snippets/latex-mode/begin.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/bib.yasnippet b/.emacs.d/snippets/latex-mode/bib.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/bib.yasnippet rename to .emacs.d/snippets/latex-mode/bib.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/big.yasnippet b/.emacs.d/snippets/latex-mode/big.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/big.yasnippet rename to .emacs.d/snippets/latex-mode/big.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/bigop.yasnippet b/.emacs.d/snippets/latex-mode/bigop.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/bigop.yasnippet rename to .emacs.d/snippets/latex-mode/bigop.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/binom.yasnippet b/.emacs.d/snippets/latex-mode/binom.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/binom.yasnippet rename to .emacs.d/snippets/latex-mode/binom.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/block.yasnippet b/.emacs.d/snippets/latex-mode/block.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/block.yasnippet rename to .emacs.d/snippets/latex-mode/block.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/bold.yasnippet b/.emacs.d/snippets/latex-mode/bold.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/bold.yasnippet rename to .emacs.d/snippets/latex-mode/bold.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/case.yasnippet b/.emacs.d/snippets/latex-mode/case.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/case.yasnippet rename to .emacs.d/snippets/latex-mode/case.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/cha.yasnippet b/.emacs.d/snippets/latex-mode/cha.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/cha.yasnippet rename to .emacs.d/snippets/latex-mode/cha.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/chastar.yasnippet b/.emacs.d/snippets/latex-mode/chastar.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/chastar.yasnippet rename to .emacs.d/snippets/latex-mode/chastar.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/cite.yasnippet b/.emacs.d/snippets/latex-mode/cite.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/cite.yasnippet rename to .emacs.d/snippets/latex-mode/cite.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/coprod.yasnippet b/.emacs.d/snippets/latex-mode/coprod.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/coprod.yasnippet rename to .emacs.d/snippets/latex-mode/coprod.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/desc.yasnippet b/.emacs.d/snippets/latex-mode/desc.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/desc.yasnippet rename to .emacs.d/snippets/latex-mode/desc.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/doc.yasnippet b/.emacs.d/snippets/latex-mode/doc.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/doc.yasnippet rename to .emacs.d/snippets/latex-mode/doc.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/em.yasnippet b/.emacs.d/snippets/latex-mode/em.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/em.yasnippet rename to .emacs.d/snippets/latex-mode/em.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/enum.yasnippet b/.emacs.d/snippets/latex-mode/enum.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/enum.yasnippet rename to .emacs.d/snippets/latex-mode/enum.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/eq.yasnippet b/.emacs.d/snippets/latex-mode/eq.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/eq.yasnippet rename to .emacs.d/snippets/latex-mode/eq.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/eqs.yasnippet b/.emacs.d/snippets/latex-mode/eqs.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/eqs.yasnippet rename to .emacs.d/snippets/latex-mode/eqs.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/fig.yasnippet b/.emacs.d/snippets/latex-mode/fig.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/fig.yasnippet rename to .emacs.d/snippets/latex-mode/fig.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/frac.yasnippet b/.emacs.d/snippets/latex-mode/frac.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/frac.yasnippet rename to .emacs.d/snippets/latex-mode/frac.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/frame.yasnippet b/.emacs.d/snippets/latex-mode/frame.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/frame.yasnippet rename to .emacs.d/snippets/latex-mode/frame.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/graphics.yasnippet b/.emacs.d/snippets/latex-mode/graphics.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/graphics.yasnippet rename to .emacs.d/snippets/latex-mode/graphics.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/href.yasnippet b/.emacs.d/snippets/latex-mode/href.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/href.yasnippet rename to .emacs.d/snippets/latex-mode/href.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/int.yasnippet b/.emacs.d/snippets/latex-mode/int.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/int.yasnippet rename to .emacs.d/snippets/latex-mode/int.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/it.yasnippet b/.emacs.d/snippets/latex-mode/it.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/it.yasnippet rename to .emacs.d/snippets/latex-mode/it.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/item.yasnippet b/.emacs.d/snippets/latex-mode/item.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/item.yasnippet rename to .emacs.d/snippets/latex-mode/item.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/label.yasnippet b/.emacs.d/snippets/latex-mode/label.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/label.yasnippet rename to .emacs.d/snippets/latex-mode/label.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/letter.yasnippet b/.emacs.d/snippets/latex-mode/letter.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/letter.yasnippet rename to .emacs.d/snippets/latex-mode/letter.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/lim.yasnippet b/.emacs.d/snippets/latex-mode/lim.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/lim.yasnippet rename to .emacs.d/snippets/latex-mode/lim.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/math.yasnippet b/.emacs.d/snippets/latex-mode/math.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/math.yasnippet rename to .emacs.d/snippets/latex-mode/math.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/matrix.yasnippet b/.emacs.d/snippets/latex-mode/matrix.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/matrix.yasnippet rename to .emacs.d/snippets/latex-mode/matrix.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/minipage.yasnippet b/.emacs.d/snippets/latex-mode/minipage.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/minipage.yasnippet rename to .emacs.d/snippets/latex-mode/minipage.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/par.yasnippet b/.emacs.d/snippets/latex-mode/par.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/par.yasnippet rename to .emacs.d/snippets/latex-mode/par.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/prod.yasnippet b/.emacs.d/snippets/latex-mode/prod.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/prod.yasnippet rename to .emacs.d/snippets/latex-mode/prod.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/ref.yasnippet b/.emacs.d/snippets/latex-mode/ref.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/ref.yasnippet rename to .emacs.d/snippets/latex-mode/ref.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/sec.yasnippet b/.emacs.d/snippets/latex-mode/sec.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/sec.yasnippet rename to .emacs.d/snippets/latex-mode/sec.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/secstar.yasnippet b/.emacs.d/snippets/latex-mode/secstar.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/secstar.yasnippet rename to .emacs.d/snippets/latex-mode/secstar.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/ssub.yasnippet b/.emacs.d/snippets/latex-mode/ssub.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/ssub.yasnippet rename to .emacs.d/snippets/latex-mode/ssub.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/ssubstar.yasnippet b/.emacs.d/snippets/latex-mode/ssubstar.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/ssubstar.yasnippet rename to .emacs.d/snippets/latex-mode/ssubstar.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/sub.yasnippet b/.emacs.d/snippets/latex-mode/sub.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/sub.yasnippet rename to .emacs.d/snippets/latex-mode/sub.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/subfig.yasnippet b/.emacs.d/snippets/latex-mode/subfig.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/subfig.yasnippet rename to .emacs.d/snippets/latex-mode/subfig.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/substar.yasnippet b/.emacs.d/snippets/latex-mode/substar.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/substar.yasnippet rename to .emacs.d/snippets/latex-mode/substar.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/sum.yasnippet b/.emacs.d/snippets/latex-mode/sum.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/sum.yasnippet rename to .emacs.d/snippets/latex-mode/sum.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/table.yasnippet b/.emacs.d/snippets/latex-mode/table.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/table.yasnippet rename to .emacs.d/snippets/latex-mode/table.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/url.yasnippet b/.emacs.d/snippets/latex-mode/url.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/url.yasnippet rename to .emacs.d/snippets/latex-mode/url.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/use.yasnippet b/.emacs.d/snippets/latex-mode/use.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/use.yasnippet rename to .emacs.d/snippets/latex-mode/use.yasnippet diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/verb.yasnippet b/.emacs.d/snippets/latex-mode/verb.yasnippet similarity index 100% rename from .emacs.d/plugins/yas/snippets/text-mode/latex-mode/verb.yasnippet rename to .emacs.d/snippets/latex-mode/verb.yasnippet diff --git a/.emacs.d/snippets/sh-mode/.yas-parents b/.emacs.d/snippets/sh-mode/.yas-parents new file mode 100644 index 00000000..eed5b442 --- /dev/null +++ b/.emacs.d/snippets/sh-mode/.yas-parents @@ -0,0 +1 @@ +text-mode diff --git a/.emacs.d/snippets/sh-mode/for b/.emacs.d/snippets/sh-mode/for new file mode 100644 index 00000000..41892c03 --- /dev/null +++ b/.emacs.d/snippets/sh-mode/for @@ -0,0 +1,6 @@ +# name: for i do done +# key: for +# -- +for i ; do + $0 +done \ No newline at end of file diff --git a/.emacs.d/plugins/yas/snippets/text-mode/sh-mode/fun b/.emacs.d/snippets/sh-mode/fun similarity index 54% rename from .emacs.d/plugins/yas/snippets/text-mode/sh-mode/fun rename to .emacs.d/snippets/sh-mode/fun index 481bb62d..3c1fdf06 100644 --- a/.emacs.d/plugins/yas/snippets/text-mode/sh-mode/fun +++ b/.emacs.d/snippets/sh-mode/fun @@ -1,4 +1,5 @@ -#name : function +# name: function +# key: fun # -- ${1:function} () { diff --git a/.emacs.d/snippets/sh-mode/getopt b/.emacs.d/snippets/sh-mode/getopt new file mode 100644 index 00000000..72be0aee --- /dev/null +++ b/.emacs.d/snippets/sh-mode/getopt @@ -0,0 +1,33 @@ +# name: getopt +# key: getopt +# -- +local missing_arg () +{ + echo "Missing argument." + echo "Use \$1 -h for help." +} + +while getopts ":h" opt; do + case $opt in + h) + printhelp "\$0" + return 1 + ;; + ?) + printhelp "\$0" + return 1 + ;; + :) + missing_arg \$0 + return 1 + ;; + esac +done + +shift $(($OPTIND - 1)) + +if [ $# -eq 0 ]; then + missing_arg \$0 + return 1 +fi +$0 diff --git a/.emacs.d/snippets/sh-mode/help b/.emacs.d/snippets/sh-mode/help new file mode 100644 index 00000000..0696aca5 --- /dev/null +++ b/.emacs.d/snippets/sh-mode/help @@ -0,0 +1,12 @@ +# name: help +# key: help +# -- +printhelp() +{ + echo "Synopsis:" + echo -e " \$1 [-n] PACKAGES" + echo + echo "Usage:" + echo -e " -h:\t\tDisplay this help." +} +$0 diff --git a/.emacs.d/plugins/yas/snippets/text-mode/sh-mode/if b/.emacs.d/snippets/sh-mode/if similarity index 51% rename from .emacs.d/plugins/yas/snippets/text-mode/sh-mode/if rename to .emacs.d/snippets/sh-mode/if index e9ddfc90..92ff9b90 100644 --- a/.emacs.d/plugins/yas/snippets/text-mode/sh-mode/if +++ b/.emacs.d/snippets/sh-mode/if @@ -1,4 +1,5 @@ -#name : if then fi +# name: if then fi +# key: if # -- if [ $1 ]; then $0 diff --git a/.emacs.d/snippets/sh-mode/while b/.emacs.d/snippets/sh-mode/while new file mode 100644 index 00000000..b4d56fd6 --- /dev/null +++ b/.emacs.d/snippets/sh-mode/while @@ -0,0 +1,6 @@ +# name: while do done +# key: while +# -- +while [ $1 ]; do + $0 +done diff --git a/.emacs.d/snippets/text-mode/email b/.emacs.d/snippets/text-mode/email new file mode 100644 index 00000000..95fad036 --- /dev/null +++ b/.emacs.d/snippets/text-mode/email @@ -0,0 +1,4 @@ +# name: (user's email) +# key: email +# -- +`(replace-regexp-in-string "@" "@NOSPAM." user-mail-address)` \ No newline at end of file diff --git a/.emacs.d/snippets/text-mode/time b/.emacs.d/snippets/text-mode/time new file mode 100644 index 00000000..814ed5f5 --- /dev/null +++ b/.emacs.d/snippets/text-mode/time @@ -0,0 +1,4 @@ +# name: (current time) +# key: time +# -- +`(current-time-string)` \ No newline at end of file diff --git a/.save b/.save index dfdf3333..f6a88c86 100755 --- a/.save +++ b/.save @@ -153,6 +153,7 @@ FILELIST=(${FILELIST[*]} ".conkyrc") ## Emacs FILELIST=(${FILELIST[*]} ".emacs") FILELIST=(${FILELIST[*]} ".emacs.d/plugins") +FILELIST=(${FILELIST[*]} ".emacs.d/snippets") FILELIST=(${FILELIST[*]} ".emacs.d/abbrev_defs") ## GnuPG diff --git a/.shell.d/funs_rc b/.shell.d/funs_rc index 9023a3fa..a51e5901 100644 --- a/.shell.d/funs_rc +++ b/.shell.d/funs_rc @@ -635,6 +635,7 @@ if [ -d "/usr/local/texlive" ]; then amscls \ amsfonts \ amsmath \ + beamer \ bigfoot \ colortbl \ easylist \ diff --git a/.xinitrc b/.xinitrc index 1883afb5..257426e1 100644 --- a/.xinitrc +++ b/.xinitrc @@ -17,21 +17,11 @@ numlockx on udiskie & exec awesome +# exec startkde -# [ -e /usr/bin/startlxde ] && exec ck-launch-session startlxde - -# exec ck-launch-session dbus-launch wmfs2 -# exec ck-launch-session dbus-launch wmfs -# exec ck-launch-session dbus-launch startkde -# exec ck-launch-session dbus-launch cinnamon +# exec ck-launch-session startlxde # exec ck-launch-session gnome-session -## WMII -#exec wmii -#until wmii; do -# true -#done - ##============================================================================== ## Wallpaper ##============================================================================== diff --git a/README b/README index c92afde7..20adbbbb 100644 --- a/README +++ b/README @@ -188,9 +188,11 @@ inkscape irssi lrzip lshw +ltrace luakit mediainfo mencoder +mercurial mkvtoolnix movgrav mplayer2 @@ -226,7 +228,9 @@ sxiv task tcc tcpdump +texi2html texlive +tig trash-cli tree udiskie