|
ということで、VIMにMacroという便利な機能があるので、それを使う。 VIM用のMacroというのはいっぱい既に出回っていて、今回は以下のものを使う。 SQLUtilities http://www.vim.org/scripts/script.php?script_id=492 まずは、上記の場所からMacroをダウンロードしてくる。 ダウンロードしたファイルを解凍し、VIMのHOMEディレクトリ配下の「plugin」 ディレクトリにファイルを配置する。 ※解凍すると、pluginフォルダを含む複数のディレクトリが出来ると思うので、 実際にはHOMEディレクトリ配下の「plugin」ディレクトリの上のディレクトリ に丸ごとコピーすれば良い。
HOMEディレクトリは、VIM上で :echo $HOME とやれば、出力される。 また、このマクロを動かすには以下のMacroも必要なのでそちらもダウンロード。
Align http://www.vim.org/scripts/script.php?script_id=294 こちらは、ダウンロード後、ダウンロードしたファイルを開く。 gvim Align.vba.gz :so% :q
これでインストールは完了。 実際に、適当なSQLファイルを読み込み :SQLUFormatter とコマンドを打つと、SQLがきれいに整形される。便利!
Add as favourites (47) | Quote this article on your site | Views: 2769
|
|
|
|
|
|
|
|
|
|
|
- Please keep the topic of messages relevant to the subject of the article.
- Personal verbal attacks will be deleted.
- Please don't use comments to plug your web site. Such material will be removed.
- Just ensure to *Refresh* your browser for a new security code to be displayed prior to clicking on the 'Send' button.
- Keep in mind that the above process only applies if you simply entered the wrong security code.
|
Powered by AkoComment Tweaked Special Edition v.1.4.6 AkoComment © Copyright 2004 by Arthur Konze - www.mamboportal.com All right reserved |