Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 13648b5

Browse files
author
ma6174
committed
fix astyle bug
1 parent b987401 commit 13648b5

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

‎.vimrc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func SetTitle()
100100
call append(line(".")+6, "")
101101
elseif &filetype == 'python'
102102
call setline(1,"#!/usr/bin/env python")
103-
call append(line("."),"#coding=utf-8")
103+
call append(line("."),"#coding=utf-8")
104104
call append(line(".")+1, "")
105105
" elseif &filetype == 'mkd'
106106
" call setline(1,"<head><meta charset=\"UTF-8\"></head>")
@@ -157,7 +157,7 @@ nnoremap <F2> :g/^\s*$/d<CR>
157157
"比较文件
158158
nnoremap <C-F2> :vert diffsplit
159159
"列出当前目录文件
160-
map <F3> :NERDTree .<CR>
160+
map <F3> :NERDTree<CR>
161161
"打开树状文件目录
162162
map <C-F3> \be
163163
:autocmd BufRead,BufNewFile *.dot map <F5> :w<CR>:!dot -Tjpg -o %<.jpg % && eog %<.jpg <CR><CR> && exec "redr!"
@@ -202,13 +202,13 @@ endfunc
202202

203203
"代码格式优化化
204204

205-
map <F6> :call FormartSrc()<CR>
205+
map <F6> :call FormartSrc()<CR><CR>
206206
207207
"定义FormartSrc()
208208
func FormartSrc()
209209
exec "w"
210210
if &filetype == 'c'
211-
exec "!astyle --style=ansi --one-line=keep-statements -a --suffix=none %"
211+
exec "!astyle --style=ansi -a --suffix=none %"
212212
elseif &filetype == 'cpp' || &filetype == 'hpp'
213213
exec "r !astyle --style=ansi --one-line=keep-statements -a --suffix=none %> /dev/null 2>&1"
214214
elseif &filetype == 'perl'

‎.zshrc

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -61,22 +61,22 @@ setopt PUSHD_IGNORE_DUPS
6161
#}}}
6262

6363
#每个目录使用独立的历史纪录{{{
64-
cd() {
65-
builtin cd "$@" # do actual cd
66-
fc -W # write current history file
67-
local HISTDIR="$HOME/.zsh_history$PWD" # use nested folders for history
68-
if [ ! -d "$HISTDIR" ] ; then # create folder if needed
69-
mkdir -p "$HISTDIR"
70-
fi
71-
export HISTFILE="$HISTDIR/zhistory" # set new history file
72-
touch $HISTFILE
73-
local ohistsize=$HISTSIZE
74-
HISTSIZE=0 # Discard previous dir's history
75-
HISTSIZE=$ohistsize # Prepare for new dir's history
76-
fc -R #read from current histfile
77-
}
78-
mkdir -p $HOME/.zsh_history$PWD
79-
export HISTFILE="$HOME/.zsh_history$PWD/zhistory"
64+
#cd() {
65+
#builtin cd "$@" # do actual cd
66+
#fc -W # write current history file
67+
#local HISTDIR="$HOME/.zsh_history$PWD" # use nested folders for history
68+
#if [ ! -d "$HISTDIR" ] ; then # create folder if needed
69+
#mkdir -p "$HISTDIR"
70+
#fi
71+
#export HISTFILE="$HISTDIR/zhistory" # set new history file
72+
#touch $HISTFILE
73+
#local ohistsize=$HISTSIZE
74+
#HISTSIZE=0 # Discard previous dir's history
75+
#HISTSIZE=$ohistsize # Prepare for new dir's history
76+
#fc -R #read from current histfile
77+
#}
78+
#mkdir -p $HOME/.zsh_history$PWD
79+
#export HISTFILE="/home/ma6174/.zhistory"
8080

8181
function allhistory { cat $(find $HOME/.zsh_history -name zhistory) }
8282
function convhistory {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /