| File src/commands.c changed (mode: 100644) (index 2572ce378..53098a471) |
| ... |
... |
static int ls_cmd(const struct cmd_info *cmd_info); |
| 175 |
175 |
static int map_cmd(const struct cmd_info *cmd_info); |
static int map_cmd(const struct cmd_info *cmd_info); |
| 176 |
176 |
static int mark_cmd(const struct cmd_info *cmd_info); |
static int mark_cmd(const struct cmd_info *cmd_info); |
| 177 |
177 |
static int marks_cmd(const struct cmd_info *cmd_info); |
static int marks_cmd(const struct cmd_info *cmd_info); |
|
178 |
|
static int messages_cmd(const struct cmd_info *cmd_info); |
| 178 |
179 |
static int mkdir_cmd(const struct cmd_info *cmd_info); |
static int mkdir_cmd(const struct cmd_info *cmd_info); |
| 179 |
180 |
static int move_cmd(const struct cmd_info *cmd_info); |
static int move_cmd(const struct cmd_info *cmd_info); |
| 180 |
181 |
static int nmap_cmd(const struct cmd_info *cmd_info); |
static int nmap_cmd(const struct cmd_info *cmd_info); |
| |
| ... |
... |
static const struct cmd_add commands[] = { |
| 302 |
303 |
.handler = mark_cmd, .qmark = 0, .expand = 1, .cust_sep = 0, .min_args = 1, .max_args = 3, .select = 0, }, |
.handler = mark_cmd, .qmark = 0, .expand = 1, .cust_sep = 0, .min_args = 1, .max_args = 3, .select = 0, }, |
| 303 |
304 |
{ .name = "marks", .abbr = NULL, .emark = 0, .id = -1, .range = 0, .bg = 0, .quote = 0, .regexp = 0, |
{ .name = "marks", .abbr = NULL, .emark = 0, .id = -1, .range = 0, .bg = 0, .quote = 0, .regexp = 0, |
| 304 |
305 |
.handler = marks_cmd, .qmark = 0, .expand = 0, .cust_sep = 0, .min_args = 0, .max_args = NOT_DEF, .select = 0, }, |
.handler = marks_cmd, .qmark = 0, .expand = 0, .cust_sep = 0, .min_args = 0, .max_args = NOT_DEF, .select = 0, }, |
|
306 |
|
{ .name = "messages", .abbr = "mes", .emark = 0, .id = -1, .range = 0, .bg = 0, .quote = 0, .regexp = 0, |
|
307 |
|
.handler = messages_cmd, .qmark = 0, .expand = 0, .cust_sep = 0, .min_args = 0, .max_args = 0, .select = 0, }, |
| 305 |
308 |
{ .name = "mkdir", .abbr = NULL, .emark = 1, .id = -1, .range = 0, .bg = 0, .quote = 1, .regexp = 0, |
{ .name = "mkdir", .abbr = NULL, .emark = 1, .id = -1, .range = 0, .bg = 0, .quote = 1, .regexp = 0, |
| 306 |
309 |
.handler = mkdir_cmd, .qmark = 0, .expand = 0, .cust_sep = 0, .min_args = 1, .max_args = NOT_DEF, .select = 0, }, |
.handler = mkdir_cmd, .qmark = 0, .expand = 0, .cust_sep = 0, .min_args = 1, .max_args = NOT_DEF, .select = 0, }, |
| 307 |
310 |
{ .name = "move", .abbr = "m", .emark = 1, .id = -1, .range = 1, .bg = 0, .quote = 1, .regexp = 0, |
{ .name = "move", .abbr = "m", .emark = 1, .id = -1, .range = 1, .bg = 0, .quote = 1, .regexp = 0, |
| |
| ... |
... |
marks_cmd(const struct cmd_info *cmd_info) |
| 3504 |
3507 |
return show_bookmarks_menu(curr_view, buf); |
return show_bookmarks_menu(curr_view, buf); |
| 3505 |
3508 |
} |
} |
| 3506 |
3509 |
|
|
|
3510 |
|
static int |
|
3511 |
|
messages_cmd(const struct cmd_info *cmd_info) |
|
3512 |
|
{ |
|
3513 |
|
char *lines; |
|
3514 |
|
size_t len; |
|
3515 |
|
int count; |
|
3516 |
|
int t; |
|
3517 |
|
|
|
3518 |
|
lines = NULL; |
|
3519 |
|
len = 0; |
|
3520 |
|
count = curr_stats.msg_tail - curr_stats.msg_head; |
|
3521 |
|
if(count < 0) |
|
3522 |
|
count += ARRAY_LEN(curr_stats.msgs); |
|
3523 |
|
t = (curr_stats.msg_head + 1) % ARRAY_LEN(curr_stats.msgs); |
|
3524 |
|
while(count-- > 0) |
|
3525 |
|
{ |
|
3526 |
|
const char *msg = curr_stats.msgs[t]; |
|
3527 |
|
lines = realloc(lines, len + 1 + strlen(msg) + 1); |
|
3528 |
|
len += sprintf(lines + len, "%s%s", (len == 0) ? "": "\n", msg); |
|
3529 |
|
t = (t + 1) % ARRAY_LEN(curr_stats.msgs); |
|
3530 |
|
} |
|
3531 |
|
|
|
3532 |
|
if(lines == NULL) |
|
3533 |
|
return 0; |
|
3534 |
|
|
|
3535 |
|
curr_stats.save_msg_in_list = 0; |
|
3536 |
|
status_bar_message(lines); |
|
3537 |
|
curr_stats.save_msg_in_list = 1; |
|
3538 |
|
|
|
3539 |
|
free(lines); |
|
3540 |
|
return 1; |
|
3541 |
|
} |
|
3542 |
|
|
| 3507 |
3543 |
static int |
static int |
| 3508 |
3544 |
mkdir_cmd(const struct cmd_info *cmd_info) |
mkdir_cmd(const struct cmd_info *cmd_info) |
| 3509 |
3545 |
{ |
{ |
| File src/vim/syntax/vifm.vim changed (mode: 100644) (index a1a239620..a82a52df0) |
| 1 |
1 |
" vifm syntax file |
" vifm syntax file |
| 2 |
2 |
" Maintainer: xaizek <xaizek@gmail.com> |
" Maintainer: xaizek <xaizek@gmail.com> |
| 3 |
|
" Last Change: September 13, 2011 |
|
|
3 |
|
" Last Change: September 25, 2011 |
| 4 |
4 |
" Based On: Vim syntax file by Dr. Charles E. Campbell, Jr. |
" Based On: Vim syntax file by Dr. Charles E. Campbell, Jr. |
| 5 |
5 |
|
|
| 6 |
6 |
if exists('b:current_syntax') |
if exists('b:current_syntax') |
| |
| ... |
... |
set cpo-=C |
| 14 |
14 |
|
|
| 15 |
15 |
" General commands |
" General commands |
| 16 |
16 |
syntax keyword vifmCommand contained alink apropos cd change chmod chown clone |
syntax keyword vifmCommand contained alink apropos cd change chmod chown clone |
| 17 |
|
\ co[py] d[elete] delm[arks] di[splay] dirs e[dit] empty exi[t] file filter |
|
| 18 |
|
\ fin[d] gr[ep] h[elp] hi[ghlight] his[tory] invert jobs locate ls marks |
|
| 19 |
|
\ mkdir m[ove] noh[lsearch] on[ly] popd pushd pwd q[uit] reg[isters] rename |
|
| 20 |
|
\ restart restore rlink screen se[t] sh[ell] sor[t] sp[lit] s[ubstitute] |
|
| 21 |
|
\ touch tr sync undol[ist] ve[rsion] vie[w] vifm w[rite] wq x[it] y[ank] |
|
|
17 |
|
\ co[py] d[elete] delm[arks] di[splay] dirs e[dit] empty exi[t] file |
|
18 |
|
\ filter fin[d] gr[ep] h[elp] hi[ghlight] his[tory] invert jobs locate ls |
|
19 |
|
\ marks mes[sages] mkdir m[ove] noh[lsearch] on[ly] popd pushd pwd q[uit] |
|
20 |
|
\ reg[isters] rename restart restore rlink screen se[t] sh[ell] sor[t] |
|
21 |
|
\ sp[lit] s[ubstitute] touch tr sync undol[ist] ve[rsion] vie[w] vifm |
|
22 |
|
\ w[rite] wq x[it] y[ank] |
| 22 |
23 |
|
|
| 23 |
24 |
" Map commands |
" Map commands |
| 24 |
25 |
syntax keyword vifmMap contained cm[ap] cno[remap] cu[nmap] map nm[ap] |
syntax keyword vifmMap contained cm[ap] cno[remap] cu[nmap] map nm[ap] |