發表文章

目前顯示的是有「vim」標籤的文章

Markdown

[PHP] PSR +VIM

The code formatting is available in VS Code through the following shortcuts: On Windows Shift + Alt + F On Mac Shift + Option + F On Ubuntu Ctrl + Shift + I http://stackoverflow.com/questions/29973357/how-do-you-format-code-in-visual-studio-code-vscode http://idroot.net/tutorials/how-to-install-php-composer-on-centos-7/ curl -sS  https://getcomposer.org/installer  | php http://stackoverflow.com/questions/857885/formatting-php-code-within-vim/31315171 Vim :version 系統 vimrc 設定檔: "/etc/vimrc" 使用者個人 vimrc 設定檔: "$HOME/.vimrc" 第二組個人 vimrc 檔案: "~/.vim/vimrc" 使用者個人 exrc 設定檔: "$HOME/.exrc" $VIM 預設值: "/etc" $VIMRUNTIME 預設值: "/usr/share/vim/vim74" ctrl+shift+v gg = https://github.com/VundleVim/Vundle.vim http://www.php-fig.org/psr/ 懶人模式 裝vim plugin 按下 v 進入檢視模式 按下gg移動到開頭 按下大寫G移動道行尾 按下=來完成縮排 === 1.Overview 只能使用 <?php 或 <?= 兩種tag 只能使用不帶 BOM 的 UTF-8 格式 ( BOM : Byte or...

[vim] setting

排版 由于在.vimrc文件中设置了 filetype plugin indent on 和 set cindent shiftwidth=4 在SecureCRT中使用鼠标复制-粘贴时,代码的自动缩进导致每一行都比上一行缩进一个tab,手工调整很麻烦,幸好发现了vim的自动排版方法: 在命令行模式下,首先使用“gg”将光标移动到文档开头,然后使用“v”切换到可视模式,再用“G”将光标移动到文档尾部(相当于全选),最后使用“=”,即可完成整个文档的自动排版。 http://blog.csdn.net/jianfyun/article/details/6594930 Vim Bundle sudo apt-get install git curl git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle vim ~/.vimrc set nocompatible " be iMproved, required filetype off " required " set the runtime path to include Vundle and initialize set rtp+=~/.vim/bundle/vundle/ call vundle#rc() " alternatively, pass a path where Vundle should install plugins "let path = '~/some/path/here' "call vundle#rc(path) " let Vundle manage Vundle, required Plugin 'gmarik/vundle' " The following are examples of different formats supported. " Keep Plugin commands between here and filetype plugin indent on. " scri...