The reason that the URI returns a 301 redirection is the trailing
slashes are misused. Historically, it’s common for URLs with a
trailing slash to indicate a directory, and those without a trailing
slash to denote a file:
The appending $(rvm gemdir)/gems will including Rails build-in
method(or class/module) definitions, it’s very useful to browse Rails
Formerly, I use the Emacs build-in find-tag command which bounding
to M-. to find the tags. It works, but what annoy me is that
everytime I find-tag, it prompt to choose a tag, even the first
one always what I want. So I write a command to take the place of
It seems that things goes well. But I found that If a method defined
in many places. find-tag only jump to one of them, and without any
prompt. This misguide me occasionally.
After some google search, I found a package
Etags-Select provides a
feature to find tag from multiple tag files, and if there are multiple
matching tags, it will open a selection window for you to choose the
one you want.
Sounds great! eh?
After give it a try, I found it’s not that perfect(not perfect for
ruby code at least). It can’t jump to the definition of a method whose
name ending with a question mark! e.g. signed_in?. After a wandering
around the source code of Etags-Select, I decide to ‘fix’ it by
myself. And finally, I made it! Yeah!
It’s showtime ;)
Firstly, git clone my forked
Etags-Select version and add
it to your Emacs load-path, you may also need to install
;;; Installation of Etags-select
(add-to-list 'load-path "/path/to/my-etags-select")(require 'etags-select)
Secondly, add following snippets to your emacs dotfile.
Look at the bottom of the Emacs frame, there is a distinctive line above the minibuffer, it’s mode-line. This displays various information about what is going on in the buffer, such as whether there are unsaved changes, the editing modes that are in use, the current line number, and so forth.
After installed several add-ons, you may find that the mode-line occupied by the minor-mode indicators. As follow:
Not all of the indicators are useful for me, even more, they (but not the minor mode) pollute the mode-line, so I want to save the limited spaces.
First, you should add this function to your .emacs.
(defunhbin-remove-mm-lighter(mm)"Remove minor lighter from the mode line."(setcar(cdr(assqmmminor-mode-alist))nil))
then I want auto-complete the reset of newer_micropost. So I press TAB, oops! nothing completed.
That’s because the punctuation character : had been declared to be a part of a word. It means that the :newer_micropost and the newer_micropost are two independent words. Yes, they are. But what I want is they should be completed by the auto-complete. This can be accomplished by a little hacky fragment: