auto-complete source for Emoji
I uploaded ac-emoji to github. This package provides auto-complete source of Emoji.
Image
Repository
https://github.com/syohex/emacs-ac-emoji
I test only MacOSX.
Sample configuration
I think this package is useful for writing Markdown or git commit message.
(add-hook 'markdown-mode-hook 'ac-emoji-setup) (add-hook 'git-commit-mode-hook 'ac-emoji-setup)
MacOSX Users
Please add emoji font configuration to your init.el. This configuration is not necessary if you use emacs with no window mode(-nw
).
(set-fontset-font t 'symbol (font-spec :family "Apple Color Emoji") nil 'prepend)
Summary
I released ac-emoji
which is auto-complete source of emoji. I plan to request this package to MELPA. If you have any suggestions or problems, please report me via github issue.
Open write mode for flock(fh, LOCK_EX) for portability
We should open file with write intent for using flock(fh, LOCK_EX
) for portability. Because flock(fh, LOCK_EX)
is failed without write intent on some platforms(such as Solaris) and platforms which does not provide flock
. (In this case Perl emulates flock
with other API).
On Linux or some BSD(include MacOSX), flock(fh, LOCK_EX)
successes without write intent. However if you want to work your module on many platforms, you should open with write intent.
perldoc -f flock
says
Note that the fcntl(2) emulation of flock(3) requires that FILEHANDLE be open with read intent to use LOCK_SH and requires that it be open with write intent to use LOCK_EX.
See also
Macで flyspell-modeを使うための設定
スペルチェックはもっぱら flyspell-mode, flyspell-bufferなので, Macでもそれを使うための設定.
ispellのインストール
% brew install ispell
昔は ~/.aspell.conf
の設定が必須だったような気がするのだが, なくても動作した. デフォルトの言語を設定を英語にしているということが関係しているのか, そもそも不要になったのかはよくわかっていない.
faceの設定
GUIだとデフォルトが波線ですごく見づらい. emacs -nw
なら真っ直ぐな下線なのでよいのだが... 見やすければなんでもいいので以下のような設定にしてみた.
(set-face-attribute 'flyspell-duplicate nil :foreground "white" :background "orange" :box t :underline nil) (set-face-attribute 'flyspell-incorrect nil :foreground "white" :background "red" :box t :underline nil)
こんな感じになります.
Tips
ドキュメントを書くときは, flyspell-modeを有効にしているだけですが, まとめてチェックしたい場合は以下のように設定して開くファイルすべてに対してスペルチェックをかけるというようなことをしています.
(add-hook 'find-file-hook 'flyspell-mode) (add-hook 'find-file-hook 'flyspell-buffer)
auto-complete for Elixir programming
I recommend you to use company-mode for auto completion of Elixir programming.
I created ac-alchemist which is auto-complete source of alchemist. Because alchemist provides only company-mode completion.
alchemist often changes its API frequently. So it may break ac-alchemist. Please report me if ac-alchemist does not work with latest alchemist via github issues.
Repository
https://github.com/syohex/emacs-ac-alchemist
Image
See also
neotree with vc-mode
neotree can work with vc-mode. So it works like Atom.io. However its feature is disabled as default. Please add following configuration to your init.el for enabling it. You also enable vc-mode.
(custom-set-variables '(neo-vc-integration '(face)))
Screenshot is here. Modified files are highlighted in magenta.
neotree supports showing vc information by face and char. We can also enable both of them as below.
(custom-set-variables '(neo-vc-integration '(face char)))
This version screenshot is here. There are E
(means edited) characters at Modified files.
Customize
Face names of neotree vc information are neo-vc-*-face
(Ex neo-vc-edited-face
). And characters of it is neo-vc-state-char-alist
. You can custom as you like. Please read documentation or source code in more detail.
enjoy hacking neotree.
Release Mouse v2.4.4
https://metacpan.org/release/SYOHEX/Mouse-v2.4.4
Mouse with threads did not work on Perl 5.22.0 or higher version. This makes Text::Xslate test failure for a long time. This version fixed the issue and works with threads. Please upgrade for newer perl users.
Example
We expects $foo->syntax
is "Kolon"
but $foo->syntax
is undef with older Mouse on Perl 5.22.0 or higher. This test is passed with Mouse v2.4.4.
#!perl package Foo; use Mouse; has syntax => ( is => 'rw', isa => 'Str', default => 'Kolon', ); package main; use strict; use warnings; use threads; use Test::More; my $foo = Foo->new; is $foo->syntax, "Kolon"; threads->create(sub{ is $foo->syntax, "Kolon"; })->join(); done_testing;