Skip to content

Instantly share code, notes, and snippets.

@zxkletters
zxkletters / one gist
Created August 15, 2012 04:55
hello world
<font color="red">hello world</font>
import java.lang.reflect.Field;
import sun.misc.Unsafe;
public class Direct {
public static void main(String... args) {
Unsafe unsafe = null;
try {
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""实用设置
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set sw=4
set ts=4
set et
set smarttab
set smartindent
set lbr
set fo+=mB
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"显示相关
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set cul "高亮光标所在行
"set cuc
set shortmess=atI " 启动的时候不显示那个援助乌干达儿童的提示
set lines=40 columns=155
set go= " 不要图形按钮
"set guifont=Courier_New:h10:cANSI " 设置字体
autocmd InsertLeave * se nocul " 用浅色高亮当前行
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"""""新文件标题
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"新建.c,.h,.sh,.java文件,自动插入文件头
autocmd BufNewFile *.cpp,*.[ch],*.sh,*.java,*.py exec ":call SetTitle()"
""定义函数SetTitle,自动插入文件头
func SetTitle()
"如果文件类型为.sh文件
if &filetype == 'sh'
call setline(1,"\#!/bin/bash")
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"键盘命令
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" keyboard shortcuts
let mapleader = ','
map <C-h> <C-w>h
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-l> <C-w>l
map <C-w> <C-w>w