Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixing snippet expansion on the first line.

  • Loading branch information...
commit 0fe59f62be68947a3d68f49d1bcaf1efddc23f5f 1 parent 00b0da4
@JEG2 authored
View
3  emacs.d/packages.el
@@ -96,6 +96,9 @@
(setq yas/buffer-local-condition t)))
(add-hook 'yas/before-expand-snippet-hook
(lambda ()
+ (if (= (line-number-at-pos) (count-lines (point-min) (point-max)))
+ (progn (call-interactively 'jeg2s-newline-below)
+ (previous-line)))
(if jeg2s-buffer-is-wrapped
(progn (fci-mode 0)
(longlines-mode 0)))))
View
3  emacs.d/snippets/fundamental-mode/shebang.yasnippet
@@ -2,5 +2,4 @@
# name: Shebang Line
# key: #!
# --
-#!${1:$$(yas/choose-value '("/usr/bin/env ruby -w" "/bin/bash" "/bin/sh"))}
-$0
+#!${1:$$(yas/choose-value '("/usr/bin/env ruby -w" "/bin/bash" "/bin/sh"))}$0
Please sign in to comment.
Something went wrong with that request. Please try again.