Compare commits

...

87 Commits

Author SHA1 Message Date
Шашкин Николай 512877ee89 .vim updated 2023-08-16 16:43:56 +03:00
Шашкин Николай 4ab61c116a .hgrc updated 2023-08-16 16:43:52 +03:00
Шашкин Николай a6cb55bfc3 .mc updated 2023-08-16 16:43:39 +03:00
Kolan Sh e2fac5676e Vim: +colorscheme: shine->default 2023-07-02 20:23:38 +03:00
Шашкин Николай 4e9c42b1d3 mc.ext -> mc.ext.ini 2023-05-17 20:15:43 +03:00
Kolan Sh 9f564fb662 .vimrc: colorscheme shine 2022-09-27 16:09:28 +03:00
Kolan Sh c7e7e5fb52 rm plugin/VimExplorer.vim 2021-11-15 12:56:34 +03:00
Kolan Sh 93a4023c2c tmux: bindings updated 2021-07-29 16:01:15 +03:00
Kolan Sh 44364e60a6 tmux: history-limit 32768 2021-05-13 16:51:50 +03:00
Kolan Sh b078e47ead VimDiff: ctermfg=white 2021-03-30 03:13:36 +03:00
Kolan Sh 2e028f8a9e Vim: ColorColumn = lightgrey 2021-03-30 03:07:58 +03:00
Kolan Sh d4ebc8ea46 Vim: change default scheme to desert 2021-03-30 02:58:29 +03:00
Kolan Sh 8fdd24562b htop: +Average CPU Bar 2019-11-21 13:02:20 +03:00
Kolan Sh 9df976d32a .vimrc: ctags&cscope: read also tags and cscope.out. 2019-11-07 16:26:58 +03:00
Kolan Sh c0bdea20b6 .vimrc: .cscope recursive search 2019-11-07 15:59:25 +03:00
Kolan Sh 5560e429ad .vimrc: .ctags recursive search 2019-11-06 21:24:06 +03:00
Kolan Sh 5b78c5a80d .vimrc: nofixendofline 2019-10-30 13:01:45 +03:00
Kolan Sh 491aa0987b tagbar.vim removed: maintaned through bundle/vundle 2019-08-14 10:55:44 +03:00
Kolan Sh 511a0c794b mc:ini updated 2019-06-13 11:04:09 +03:00
Kolan Sh c3eb2b73d6 htoprc updated 2019-06-13 11:02:58 +03:00
Kolan Sh d80f5d5e85 pager.branch = false 2019-05-17 16:43:10 +03:00
Kolan Sh cded9f41d3 .gitconfig updated 2019-03-26 12:29:50 +03:00
Kolan Sh 881c4f4a2f .gitconfig updated 2019-03-19 11:54:13 +03:00
Kolan Sh 536310e3a0 Vim: command mode with russian keys. 2018-07-27 11:09:40 +03:00
Kolan Sh 1456f092ca mc && hgrc updated 2018-01-01 15:42:02 +03:00
Kolan Sh dd0f57a98a dircolors updated 2017-12-30 19:14:33 +03:00
Kolan Sh eab395dcf2 dircolors updated 2017-12-30 19:02:52 +03:00
Kolan Sh 4cb277e2a0 Vim: do not expand tabs by default. 2016-10-25 11:19:43 +03:00
Kolan Sh 94486c24bb git config: decorate->tag = magenta. 2016-10-04 02:00:49 +03:00
Kolan Sh a0e122d20f git config: yellow bold -> yellow as yellow bold not seen on white background. 2016-10-03 16:34:21 +03:00
Kolan Sh 4946a214ed dircolors*: multiple hardlinks not seen on white background. 2016-09-25 16:27:23 +03:00
Kolan Sh 1a3360e8a3 Revert "Vim: Yggdroot/indentLine added."
This reverts commit 8c4b8a3f96.
2016-02-20 10:51:52 +03:00
Kolan Sh 8c4b8a3f96 Vim: Yggdroot/indentLine added. 2016-02-13 12:57:48 +03:00
Kolan Sh 184d5ecd8c git glog alias added. 2015-09-03 13:27:02 +03:00
Kolan Sh fde5e4712e Tab keys remapped. 2015-08-26 14:12:25 +03:00
Kolan Sh f4fbbaa5a5 Mercurial hostfingerprints updated 2015-03-06 15:20:37 +03:00
Kolan Sh 4ee00217bf Mercurial hosts fingerprints updated. 2015-03-06 14:52:47 +03:00
Kolan Sh 84c18a41fe Git: Do not check SSL certificate. 2015-01-10 18:42:04 +03:00
Kolan Sh 4715d6747b Disable throw-away windows in TMUX. 2014-12-22 18:38:19 +03:00
Kolan Sh 4995e91b0f Disable rstacruz/sparkup plugin (Ctrl+E in *.php) brokes the code. 2014-09-06 13:01:24 +04:00
Kolan Sh e486602a60 Vimrc: set breakindent 2014-06-27 00:42:06 +04:00
Kolan Sh 36c3f59e05 Vimrc: set breakindent 2014-06-27 00:26:52 +04:00
Kolan Sh 0ea91c28e2 .tmux.conf updated 2014-06-26 19:16:13 +04:00
Kolan Sh 439f874b82 Vimrc: Vala/Cpp linewidths. 2014-04-28 11:45:05 +04:00
Kolan Sh 27462c1e7d Vim: g:clang_complete_copen = 0 2014-04-11 16:32:45 +04:00
Kolan Sh f2a3713bd0 Tabs in Vala files. 2014-02-12 15:04:56 +04:00
Kolan Sh 826a49cd27 Indents for sh-files added 2014-02-11 16:01:40 +04:00
Kolan Sh f5478c7cb9 Git/Hg: Email updated 2014-01-17 13:49:59 +04:00
Kolan Sh 6575b20736 NerdCommenter added 2013-11-03 17:34:47 +04:00
Kolan Sh 90b014ca57 links configuration updated 2013-09-25 17:10:01 +04:00
Kolan Sh 356127e831 Vim: fugitive Git plugin added. 2013-09-05 11:10:19 +04:00
Kolan Sh ab9bacae6b .htoprc removed 2013-08-06 14:19:52 +04:00
Kolan Sh 7ed7aafdcd Vim colors updated 2013-08-02 18:11:25 +04:00
Kolan Sh b80a59cbd6 Clang autocomplete added. 2013-08-02 17:36:49 +04:00
Kolan Sh 9c4f64c210 Vim colors updated 2013-08-02 17:36:31 +04:00
Kolan Sh 3d10ea0ba3 Vim: tabsize 8->4 2013-06-20 17:26:50 +04:00
Kolan Sh 8d08b77999 Vim: vim-startify plugin added to Vundle list. 2013-06-01 15:39:58 +04:00
Kolan Sh 299284c149 VimDiff: do/dp shortcuts for 3-way diffs. 2013-04-10 14:30:36 +04:00
Kolan Sh b8a726bd5e Git config updated. 2013-04-10 13:54:46 +04:00
Kolan Sh dd675d0aae Vim: CPP indent 2013-04-09 13:02:46 +04:00
Kolan Sh 90fc0366e5 Vim: tabs widths updated. 2013-04-02 12:53:48 +04:00
Kolan Sh 04072f63c8 tmux: TERM=screen-256color 2013-04-01 15:32:08 +04:00
Kolan Sh 56868caed4 TERM=xterm-256color on master 2013-03-29 10:54:19 +04:00
Kolan Sh fb9fd2a520 Hack for xterm-keys. 2013-03-27 16:11:31 +04:00
Kolan Sh bf333221be tmux.conf: default-terminal=screen-256color 2013-03-23 20:43:00 +04:00
Kolan Sh 952e8455a3 .dircolors updated!!! 2013-03-18 16:29:31 +04:00
Kolan Sh b99fc8bdd7 .dircolors_256 updated!!! 2013-03-18 15:38:16 +04:00
Kolan Sh 83576030a9 .dircolors_256 updated!!! 2013-03-18 15:36:51 +04:00
Kolan Sh 78dfbf197d LS_COLORS set by dircolors. 2013-03-15 15:59:58 +04:00
Kolan Sh 5f9a31800e .nanorc added. 2013-03-15 12:43:51 +04:00
Kolan Sh cf46c4c692 LS_COLORS set by dircolors. 2013-03-15 12:35:31 +04:00
Kolan Sh 932e257374 LS_COLORS set by dircolors. 2013-03-15 12:30:36 +04:00
Kolan Sh 3e37fd2288 tmux.conf: TERM=xterm-256color 2013-03-13 15:01:53 +04:00
Kolan Sh 51cdf723b1 Removing explicit TERM setup. 2013-03-13 14:38:26 +04:00
Kolan Sh 26fcac35b1 cgdb works incorrectly with TERM=xterm-256color, so ->screen-256color 2013-03-13 11:43:13 +04:00
Kolan Sh 302ada26d0 git config --global push.default matching 2013-03-06 19:21:26 +04:00
Kolan Sh 4ccd1c8b26 Bundle 'majutsushi/tagbar' 2013-03-04 16:31:15 +04:00
Kolan Sh 7b9790db8a tmux.conf: screen-256color -> xterm-256color 2013-03-03 16:17:59 +04:00
Kolan Sh 1f94e77f04 .vimrc: Bundle 'vim-tags' 2013-02-28 12:13:44 +04:00
Kolan Sh 3929458462 Vim: fileencodings. 2013-02-27 16:33:03 +04:00
Kolan Sh f660b0ccd9 tmux.conf: screen-256color 2013-02-26 19:19:41 +04:00
Kolan Sh 9bcc03312f removed 'default-terminal' string 2013-02-23 18:23:32 +04:00
Kolan Sh e561be78fc .vim/ updated 2013-02-04 18:00:48 +04:00
Kolan Sh 5715dce618 vimrc updated 2013-02-04 17:58:09 +04:00
Kolan Sh 53823fd2d5 cp branch:.hgrc -> master:.hgrc 2013-01-25 16:46:11 +04:00
Kolan Sh 57eabc41b3 htoprc added 2013-01-21 19:31:59 +04:00
Kolan Sh aa4ed0788d gitconfig updated 2012-12-20 23:29:57 +04:00
54 changed files with 25471 additions and 934 deletions

26
.config/htop/htoprc Normal file
View File

@ -0,0 +1,26 @@
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=46
sort_direction=1
hide_threads=0
hide_kernel_threads=1
hide_userland_threads=0
shadow_other_users=0
show_thread_names=0
show_program_path=1
highlight_base_name=0
highlight_megabytes=1
highlight_threads=1
tree_view=0
header_margin=1
detailed_cpu_time=0
cpu_count_from_zero=0
update_process_names=0
account_guest_in_cpu_meter=0
color_scheme=0
delay=15
left_meters=LeftCPUs Memory Swap
left_meter_modes=1 1 1
right_meters=RightCPUs Tasks LoadAverage Uptime CPU
right_meter_modes=1 2 2 2 1

View File

@ -1,78 +1,77 @@
[Midnight-Commander] [Midnight-Commander]
verbose=1 verbose=true
pause_after_run=1 pause_after_run=1
shell_patterns=1 shell_patterns=true
auto_save_setup=1 auto_save_setup=true
auto_menu=0 auto_menu=false
use_internal_view=0 use_internal_view=false
use_internal_edit=0 use_internal_edit=false
clear_before_exec=1 clear_before_exec=true
confirm_delete=1 confirm_delete=true
confirm_overwrite=1 confirm_overwrite=true
confirm_execute=0 confirm_execute=false
confirm_history_cleanup=1 confirm_history_cleanup=true
confirm_exit=1 confirm_exit=true
confirm_directory_hotlist_delete=1 confirm_directory_hotlist_delete=true
safe_delete=0 safe_delete=false
mouse_repeat_rate=100 mouse_repeat_rate=100
double_click_speed=250 double_click_speed=250
use_8th_bit_as_meta=0 use_8th_bit_as_meta=false
confirm_view_dir=0 confirm_view_dir=false
mouse_move_pages_viewer=1 mouse_move_pages_viewer=true
mouse_close_dialog=0 mouse_close_dialog=false
fast_refresh=0 fast_refresh=false
drop_menus=0 drop_menus=false
wrap_mode=1 wrap_mode=true
old_esc_mode=1 old_esc_mode=true
old_esc_mode_timeout=1000000 old_esc_mode_timeout=1000000
cd_symlinks=1 cd_symlinks=true
show_all_if_ambiguous=0 show_all_if_ambiguous=false
max_dirt_limit=10 max_dirt_limit=10
torben_fj_mode=0 torben_fj_mode=0
use_file_to_guess_type=1 use_file_to_guess_type=true
alternate_plus_minus=0 alternate_plus_minus=false
only_leading_plus_minus=1 only_leading_plus_minus=true
show_output_starts_shell=0 show_output_starts_shell=false
xtree_mode=0 xtree_mode=false
num_history_items_recorded=60 num_history_items_recorded=60
file_op_compute_totals=1 file_op_compute_totals=true
classic_progressbar=0 classic_progressbar=false
vfs_timeout=60 vfs_timeout=60
ftpfs_directory_timeout=900 ftpfs_directory_timeout=900
use_netrc=1 use_netrc=true
ftpfs_retry_seconds=30 ftpfs_retry_seconds=30
ftpfs_always_use_proxy=0 ftpfs_always_use_proxy=false
ftpfs_use_passive_connections=1 ftpfs_use_passive_connections=true
ftpfs_use_passive_connections_over_proxy=0 ftpfs_use_passive_connections_over_proxy=false
ftpfs_use_unix_list_options=1 ftpfs_use_unix_list_options=true
ftpfs_first_cd_then_ls=1 ftpfs_first_cd_then_ls=true
fish_directory_timeout=900 fish_directory_timeout=900
editor_tab_spacing=8 editor_tab_spacing=8
editor_word_wrap_line_length=72 editor_word_wrap_line_length=72
editor_fill_tabs_with_spaces=0 editor_fill_tabs_with_spaces=false
editor_return_does_auto_indent=1 editor_return_does_auto_indent=true
editor_backspace_through_tabs=0 editor_backspace_through_tabs=false
editor_fake_half_tabs=1 editor_fake_half_tabs=true
editor_option_save_mode=0 editor_option_save_mode=0
editor_option_save_position=1 editor_option_save_position=true
editor_option_auto_para_formatting=0 editor_option_auto_para_formatting=false
editor_option_typewriter_wrap=0 editor_option_typewriter_wrap=false
editor_edit_confirm_save=1 editor_edit_confirm_save=true
editor_syntax_highlighting=1 editor_syntax_highlighting=true
editor_persistent_selections=1 editor_persistent_selections=true
editor_cursor_beyond_eol=0 editor_cursor_beyond_eol=false
editor_visible_tabs=1 editor_visible_tabs=true
editor_visible_spaces=1 editor_visible_spaces=true
editor_line_state=0 editor_line_state=false
editor_simple_statusbar=0 editor_simple_statusbar=false
editor_check_new_line=0 editor_check_new_line=false
editor_show_right_margin=0 editor_show_right_margin=false
nice_rotating_dash=1 nice_rotating_dash=true
horizontal_split=0 mcview_remember_file_position=false
mcview_remember_file_position=0 auto_fill_mkdir_name=true
auto_fill_mkdir_name=1 copymove_persistent_attr=true
copymove_persistent_attr=1
select_flags=6 select_flags=6
editor_backup_extension=~ editor_backup_extension=~
mcview_eof= mcview_eof=
@ -92,31 +91,46 @@ permission_mode=0
quick_search_case_sensitive=2 quick_search_case_sensitive=2
ignore_ftp_chattr_errors=true ignore_ftp_chattr_errors=true
keymap=mc.keymap keymap=mc.keymap
skin=klmn0 skin=dark
panel_scroll_pages=1 panel_scroll_pages=1
auto_save_setup_panels=1 auto_save_setup_panels=1
filepos_max_saved_entries=1024 filepos_max_saved_entries=1024
preallocate_space=0 preallocate_space=false
editor_group_undo=0 editor_group_undo=false
editor_drop_selection_on_copy=true
editor_cursor_after_inserted_block=false
editor_state_full_filename=false
editor_ask_filename_before_edit=false
editor_filesize_threshold=64M
editor_stop_format_chars=-+*\\,.;:&>
safe_overwrite=false
shadows=true
[Layout] [Layout]
equal_split=1 message_visible=true
first_panel_size=142 keybar_visible=false
message_visible=1 xterm_title=true
keybar_visible=0
xterm_title=1
output_lines=0 output_lines=0
command_prompt=1 command_prompt=true
menubar_visible=0 menubar_visible=false
show_mini_info=1 show_mini_info=1
free_space=1 free_space=true
permission_mode=0 permission_mode=0
filetype_mode=1 filetype_mode=1
horizontal_split=false
vertical_equal=true
left_panel_size=118
horizontal_equal=true
top_panel_size=29
[Misc] [Misc]
timeformat_recent=%b %e %H:%M timeformat_recent=%b %e %H:%M
timeformat_old=%b %e %Y timeformat_old=%b %e %Y
@ -130,6 +144,8 @@ clipboard_paste=
find_ignore_dirs= find_ignore_dirs=
spell_language=en
[Colors] [Colors]
base_color= base_color=
screen= screen=
@ -143,6 +159,14 @@ linux=
screen.rxvt= screen.rxvt=
xterm-256color=
screen-256color=
screen-256color-bce=
rxvt-unicode-256color=
[Panels] [Panels]
kilobyte_si=false kilobyte_si=false
mix_all_files=false mix_all_files=false
@ -165,6 +189,10 @@ simple_swap=false
show_mini_info=true show_mini_info=true
torben_fj_mode=false torben_fj_mode=false
select_flags=6
panel_scroll_center=false
[Panelize] [Panelize]
Найти корректуры, отвергнутые командой patch=find . -name \\*.rej -print Найти корректуры, отвергнутые командой patch=find . -name \\*.rej -print
Найти оригиналы (*.orig) после команды patch=find . -name \\*.orig -print Найти оригиналы (*.orig) после команды patch=find . -name \\*.orig -print

View File

@ -1,776 +0,0 @@
# Midnight Commander 3.0 extension file
# Warning: Structure of this file has changed completely with version 3.0
#
# All lines starting with # or empty lines are thrown away.
# Lines starting in the first column should have following format:
#
# keyword/descNL, i.e. everything after keyword/ until new line is desc
#
# keyword can be:
#
# shell (desc is, when starting with a dot, any extension (no wildcars),
# i.e. matches all the files *desc . Example: .tar matches *.tar;
# if it doesn't start with a dot, it matches only a file of that name)
#
# regex (desc is an extended regular expression)
# Please note that we are using the GNU regex library and thus
# \| matches the literal | and | has special meaning (or) and
# () have special meaning and \( \) stand for literal ( ).
#
# type (file matches this if `file %f` matches regular expression desc
# (the filename: part from `file %f` is removed))
#
# directory (matches any directory matching regular expression desc)
#
# include (matches an include directive)
#
# default (matches any file no matter what desc is)
#
# Other lines should start with a space or tab and should be in the format:
#
# keyword=commandNL (with no spaces around =), where keyword should be:
#
# Open (if the user presses Enter or doubleclicks it),
#
# View (F3), Edit (F4)
#
# Include is the keyword used to add any further entries from an include/
# section
#
# command is any one-line shell command, with the following substitutions:
#
# %% -> % character
# %p -> name of the current file (without path, but pwd is its path)
# %f -> name of the current file. Unlike %p, if file is located on a
# non-local virtual filesystem, i.e. either tarfs, mcfs or ftpfs,
# then the file will be temporarily copied into a local directory
# and %f will be the full path to this local temporal file.
# If you don't want to get a local copy and want to get the
# virtual fs path (like /#ftp:ftp.cvut.cz/pub/hungry/xword), then
# use %d/%p instead of %f.
# %d -> name of the current directory (pwd, without trailing slash)
# %s -> "selected files", i.e. space separated list of tagged files if any
# or name of the current file
# %t -> list of tagged files
# %u -> list of tagged files (they'll be untaged after the command)
#
# (If these 6 letters are in uppercase, they refer to the other panel.
# But you shouldn't have to use it in this file.)
#
#
# %cd -> the rest is a path mc should change into (cd won't work, since it's
# a child process). %cd handles even vfs names.
#
# %view -> the command you type will be piped into mc's internal file viewer
# if you type only the %view and no command, viewer will load %f file
# instead (i.e. no piping, so it is different to %view cat %f)
# %view may be directly followed by {} with a list of any of
# ascii (Ascii mode), hex (Hex mode), nroff (color highlighting for
# text using backspace for bold and underscore) and unform
# (no highlighting for nroff sequences) separated by commas.
#
# %var -> You use it like this: %var{VAR:default}. This macro will expand
# to the value of the VAR variable in the environment if it's set
# otherwise the value in default will be used. This is similar to
# the Bourne shell ${VAR-default} construct.
#
# Rules are applied from top to bottom, thus the order is important.
# If some actions are missing, search continues as if this target didn't
# match (i.e. if a file matches the first and second entry and View action
# is missing in the first one, then on pressing F3 the View action from
# the second entry will be used. default should catch all the actions.
#
# Any new entries you develop for you are always welcome if they are
# useful on more than one system. You can send your modifications
# by e-mail to mc-devel@gnome.org
### Changes ###
#
# Reorganization: 2000-05-01 Michal Svec <rebel@penguin.cz>
### TODO ###
#
# Postscript Open: ps2svga [gs -DEVICE=jpeg|zgv or something]
# Images asciiview
#
# All X Apps [Nothing/Warning] if no DISPLAY
# Not found [Default/Warning]
# Empty Output [Default/Warning]
# Edit: CopyOut+EDIT+CopyIn
# Security Check gzip/bzip EDIT (mktemp)
#
# Maybe: Open/XOpen/GOpen/KOpen/... for Console/X/GNOME/KDE/etc.
### Archives ###
# .tgz, .tpz, .tar.gz, .tar.z, .tar.Z, .ipk
regex/\.t([gp]?z|ar\.g?[zZ])$|\.ipk$
Open=%cd %p/utar://
View=%view{ascii} gzip -dc %f 2>/dev/null | tar tvvf -
regex/\.tar\.bz$
# Open=%cd %p/utar://
View=%view{ascii} bzip -dc %f 2>/dev/null | tar tvvf -
regex/\.t(ar\.bz2|bz|b2)$
Open=%cd %p/utar://
View=%view{ascii} bzip2 -dc %f 2>/dev/null | tar tvvf -
# .tar.lzma, .tlz
regex/\.t(ar\.lzma|lz)$
Open=%cd %p/utar://
View=%view{ascii} lzma -dc %f 2>/dev/null | tar tvvf -
# .tar.xz, .txz
regex/\.t(ar\.xz|xz)$
Open=%cd %p/utar://
View=%view{ascii} xz -dc %f 2>/dev/null | tar tvvf -
# .tar.F - used in QNX
regex/\.tar\.F$
# Open=%cd %p/utar://
View=%view{ascii} freeze -dc %f 2>/dev/null | tar tvvf -
# .qpr/.qpk - QNX Neutrino package installer files
regex/\.(qp[rk])$
Open=%cd %p/utar://
View=%view{ascii} gzip -dc %f 2>/dev/null | tar tvvf -
# tar
regex/\.(tar|TAR)$
Open=%cd %p/utar://
View=%view{ascii} tar tvvf - %f
# lha
type/^LHa\ .*archive
Open=%cd %p/ulha://
View=%view{ascii} lha l %f
# arj
regex/\.a(rj|[0-9][0-9])$
Open=%cd %p/uarj://
View=%view{ascii} unarj l %f
# ha
regex/\.([Hh][Aa])$
Open=%cd %p/uha://
View=%view{ascii} ha lf %f
# rar
regex/\.[rR]([aA][rR]|[0-9][0-9])$
Open=%cd %p/urar://
View=%view{ascii} rar v -c- %f
# ALZip
regex/\.(alz|ALZ)$
Open=%cd %p/ualz://
View=%view{ascii} unalz -l %f
# cpio
shell/.cpio.Z
Open=%cd %p/ucpio://
View=%view{ascii} gzip -dc %f | cpio -itv 2>/dev/null
shell/.cpio.gz
Open=%cd %p/ucpio://
View=%view{ascii} gzip -dc %f | cpio -itv 2>/dev/null
shell/.cpio
Open=%cd %p/ucpio://
View=%view{ascii} cpio -itv < %f 2>/dev/null
# ls-lR
regex/(^|\.)ls-?lR(\.gz|Z|bz2)$
Open=%cd %p/lsl://R
# patch
regex/\.(diff|patch)(\.bz2)$
Open=%cd %p/patchfs://
View=%view{ascii} bzip2 -dc %f 2>/dev/null
regex/\.(diff|patch)(\.(gz|Z))$
Open=%cd %p/patchfs://
View=%view{ascii} gzip -dc %f 2>/dev/null
regex/\.(diff|patch)$
Open=%cd %p/patchfs://
View=%view{ascii} /bin/cat %f 2>/dev/null
# ar library
regex/\.s?a$
Open=%cd %p/uar://
#Open=%view{ascii} ar tv %f
View=%view{ascii} file %f && nm %f
# trpm
regex/\.trpm$
Open=%cd %p/trpm://
View=%view{ascii} rpm -qivl --scripts `basename %p .trpm`
# RPM packages (SuSE uses *.spm for source packages)
regex/\.(src\.rpm|spm)$
Open=%cd %p/srpm://
View=%view{ascii} if rpm --nosignature --version >/dev/null 2>&1; then RPM="rpm --nosignature" ; else RPM="rpm" ; fi ; $RPM -qivlp --scripts %f
regex/\.rpm$
Open=%cd %p/rpm://
View=%view{ascii} if rpm --nosignature --version >/dev/null 2>&1; then RPM="rpm --nosignature" ; else RPM="rpm" ; fi ; $RPM -qivlp --scripts %f
# deb
regex/\.u?deb$
Open=%cd %p/deb://
View=%view{ascii} dpkg-deb -I %f && echo && dpkg-deb -c %f
# dpkg
shell/.debd
Open=%cd %p/debd://
View=%view{ascii} dpkg -s `echo %p | sed 's/\([0-9a-z.-]*\).*/\1/'`
# apt
shell/.deba
Open=%cd %p/deba://
View=%view{ascii} apt-cache show `echo %p | sed 's/\([0-9a-z.-]*\).*/\1/'`
# ISO9660
regex/\.iso$
Open=%cd %p/iso://9660
View=%view{ascii} isoinfo -l -i %f
# 7zip archives (they are not man pages)
regex/\.(7z|7Z)$
Open=%cd %p/u://7z
View=%view{ascii} 7za l %f 2>/dev/null
# Mailboxes
type/^ASCII\ mail\ text
Open=%cd %p/mailfs://
### Sources ###
# C
shell/.c
#Open=%var{EDITOR:vi} %f
Open=(geany %f &>/dev/null)&
# Fortran
shell/.f
#Open=%var{EDITOR:vi} %f
Open=(geany %f &>/dev/null)&
# Header
regex/\.(h|hpp)$
#Open=%var{EDITOR:vi} %f
Open=(geany %f &>/dev/null)&
# Object
type/^ELF
#Open=%var{PAGER:more} %f
View=%view{ascii} file %f && nm %f
# Asm
shell/.s
#Open=%var{EDITOR:vi} %f
Open=(geany %f &>/dev/null)&
# C++
regex/\.(C|cc|cpp)$
#Open=%var{EDITOR:vi} %f
Open=(geany %f &>/dev/null)&
# PAS
regex/\.([Pp][Aa][Ss])$
#Open=%var{EDITOR:vi} %f
Open=(geany %f &>/dev/null)&
# PERL
regex/\.([Pp][Ll])$
#Open=%var{EDITOR:vi} %f
Open=(geany %f &>/dev/null)&
# PYTHON
regex/\.([Pp][Yy])$
#Open=%var{EDITOR:vi} %f
Open=(geany %f &>/dev/null)&
# Java
regex/\.([Jj][Aa][Vv][Aa])$
#Open=%var{EDITOR:vi} %f
Open=(geany %f &>/dev/null)&
# Baurn's shell
regex/\.([Ss][Hh])$
#Open=%var{EDITOR:vi} %f
Open=(geany %f &>/dev/null)&
### TXT ###
regex/\.([Tt][Xx][Tt])$
#Open=%var{EDITOR:vi} %f
Open=(geany %f &>/dev/null)&
### Geany projects ###
regex/\.([Gg][Ee][Aa][Nn][Yy])$
#Open=%var{EDITOR:vi} %f
Open=(geany %f &>/dev/null)&
### XML ###
regex/\.([Xx][Mm][Ll])$
Open=(oxygenxml %f &>/dev/null)&
### Windows's executables ###
regex/\.([Ee][Xx][Ee])$
#Open=%var{EDITOR:vi} %f
Open=(wine %f >/dev/null 2>&1)&
### Documentation ###
# Texinfo
regex/\.(te?xi|texinfo)$
# GNU Info page
type/^Info\ text
Open=info -f %f
shell/.info
Open=info -f %f
# Manual page
# Exception - .so libraries are not manual pages
regex/\.(so|so\.[0-9\.]*)$
View=%view{ascii} file %f && nm %f
#regex/(([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])|\.man)$
# Open=case %d/%f in */log/*|*/logs/*) cat %f ;; *) { zsoelim %f 2>/dev/null || cat %f; } | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more}
# View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) cat %f ;; *) { zsoelim %f 2>/dev/null || cat %f; } | nroff -c -Tlatin1 -mandoc ;; esac
# Perl pod page
shell/.pod
Open=pod2man %f | nroff -c -Tlatin1 -mandoc | %var{PAGER:more}
View=%view{ascii,nroff} pod2man %f | nroff -c -Tlatin1 -mandoc
# Troff with me macros.
# Exception - "read.me" is not a nroff file.
shell/read.me
Open=
View=
shell/.me
Open=nroff -c -Tlatin1 -me %f | %var{PAGER:more}
View=%view{ascii,nroff} nroff -c -Tlatin1 -me %f
# Troff with ms macros.
shell/.ms
Open=nroff -c -Tlatin1 -ms %f | %var{PAGER:more}
View=%view{ascii,nroff} nroff -c -Tlatin1 -ms %f
# Manual page - compressed
regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.g?[Zz]$
Open=case %d/%f in */log/*|*/logs/*) gzip -dc %f ;; *) gzip -dc %f | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more}
View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) gzip -dc %f ;; *) gzip -dc %f | nroff -c -Tlatin1 -mandoc ;; esac
regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz$
Open=case %d/%f in */log/*|*/logs/*) bzip -dc %f ;; *) bzip -dc %f | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more}
View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) bzip -dc %f ;; *) bzip -dc %f | nroff -c -Tlatin1 -mandoc ;; esac
regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz2$
Open=case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more}
View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff -c -Tlatin1 -mandoc ;; esac
regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lzma$
Open=case %d/%f in */log/*|*/logs/*) lzma -dc %f ;; *) lzma -dc %f | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more}
View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) lzma -dc %f ;; *) lzma -dc %f | nroff -c -Tlatin1 -mandoc ;; esac
regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.xz$
Open=case %d/%f in */log/*|*/logs/*) xz -dc %f ;; *) xz -dc %f | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more}
View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) xz -dc %f ;; *) xz -dc %f | nroff -c -Tlatin1 -mandoc ;; esac
### Images ###
type/^GIF
Include=image
type/^JPEG
Include=image
type/^PC\ bitmap
Include=image
type/^PNG
Include=image
type/^TIFF
Include=image
type/^PBM
Include=image
type/^PGM
Include=image
type/^PPM
Include=image
type/^Netpbm
Include=image
shell/.xcf
Open=(gimp %f >dev/null 2>&1 &)
shell/.xbm
Open=bitmap %f
shell/.xpm
Include=image
View=sxpm %f
shell/.ico
Include=image
regex/\.([Xx][Cc][Ff])$
Include=image
regex/\.([Ss][Vv][Gg])$
Include=image
regex/\.([Pp][Nn][Gg])$
Include=image
regex/\.([Jj][Pp][Gg])$
Include=image
regex/\.([Ss][Vv][Gg][Zz])$
Include=image
include/image
Open=if [ "$DISPLAY" = "" ]; then zgv %f; else (gqview %f >/dev/null 2>&1 &); fi
View=%view{ascii} identify %f
#View=%view{ascii} asciiview %f
Edit=(gimp %f >/dev/null 2>&1)&
# Diagrams
regex/\.([Dd][Ii][Aa])$
Open=(dia %f &>/dev/null)&
regex/\.([Vv][Ss][Dd])$
Open=(lodraw %f &>/dev/null)&
### Sound files ###
regex/\.([wW][aA][vV]|[sS][nN][dD]|[vV][oO][cC]|[aA][uU]|[sS][mM][pP]|[aA][iI][fF][fF]|[sS][nN][dD])$
# Open=if [ "$DISPLAY" = "" ]; then play %f; else (xmms %f >/dev/null 2>&1 &); fi
Open=mplayer %f
regex/\.([mM][oO][dD]|[sS]3[mM]|[xX][mM]|[iI][tT]|[mM][tT][mM]|669|[sS][tT][mM]|[uU][lL][tT]|[fF][aA][rR])$
Open=mikmod %f
#Open=tracker %f
regex/\.([wW][aA][wW]22)$
# Open=vplay -s 22 %f
Open=mplayer %f
regex/\.([mM][pP]3)$
# Open=if [ "$DISPLAY" = "" ]; then mpg123 %f; else (xmms %f >/dev/null 2>&1 &); fi
Open=mplayer %f
View=%view{ascii} mpg123 -vtn1 %f 2>&1 | sed -n '/^Title/,/^Comment/p;/^MPEG/,/^Audio/p'
regex/\.([oO][gG][gG|aA|vV|xX])$
# Open=if [ "$DISPLAY" = "" ]; then ogg123 %f; else (xmms %f >/dev/null 2>&1 &); fi
Open=mplayer %f
View=%view{ascii} ogginfo %s
regex/\.([sS][pP][xX]|[fF][lL][aA][cC])$
Open=if [ "$DISPLAY" = "" ]; then play %f; else (xmms %f >/dev/null 2>&1 &); fi
regex/\.([mM][iI][dD][iI]?|[rR][mM][iI][dD]?)$
Open=timidity %f
regex/\.([wW][mM][aA])$
# Open=mplayer -vo null %f
Open=mplayer %f
View=%view{ascii} mplayer -quiet -slave -frames 0 -vo null -ao null -identify %f 2>/dev/null | tail +13 || file %f
### Play lists ###
regex/\.([mM]3[uU]|[pP][lL][sS])$
Open=if [ -z "$DISPLAY" ]; then mplayer -vo null -playlist %f; else (xmms -p %f >/dev/null 2>&1 &); fi
### Video ###
regex/\.([aA][vV][iI])$
Include=video
regex/\.([aA][sS][fFxX])$
Include=video
regex/\.([dD][iI][vV][xX])$
Include=video
regex/\.([mM][oO][vV]|[qQ][tT])$
Include=video
regex/\.([mM][pP]4|[mM][pP][eE]?[gG])$
Include=video
regex/\.([vV][oO][bB])$
Include=video
regex/\.([wW][mM][vV])$
Include=video
regex/\.([fF][lL][iIcCvV])$
Include=video
regex/\.([oO][gG][mM])$
Include=video
regex/\.([Mm][Kk][Vv])$
Include=video
regex/\.([rR][aA]?[mM])$
Open=(realplay %f >/dev/null 2>&1 &)
regex/\.([mM]4[vV])$
Include=video
regex/\.([3][Gg][Pp])$
Include=video
include/video
Open=(mplayer %f &>/dev/null)&
Edit=mplayer -fs %f
#Edit=echo %p
#View=echo "%d/%p"|cut -d# -f2|sed s/:/':\/\/'/
#Open=(gtv %f >/dev/null 2>&1 &)
#Open=(xanim %f >/dev/null 2>&1 &)
### Documents ###
# Postscript
type/^PostScript
#Open=(gv %f &)
Open=(evince %f &>/dev/null)&
View=%view{ascii} ps2ascii %f
# PDF
type/^PDF
#Open=(xpdf %f &)
Open=(evince %f &>/dev/null)&
#Open=(acroread %f &)
#Open=(ghostview %f &)
View=%view{ascii} pdftotext %f -
# DJVU
regex/\.([Dd][Jj][Vv][Uu])$
Open=(evince %f &>/dev/null)&
regex/\.([Dd][Jj][Vv])$
Open=(evince %f &>/dev/null)&
# CHM
regex/\.([Cc][Hh][Mm])$
Open=(chmsee %f >/dev/null 2>&1 &)
# Maple
regex/\.([Mm][Ww][Ss]|[Mm][Ww])$
Open=(xmaple %f >/dev/null 2>&1)&
# LabView file
regex/\.([Vv][Ii])$
Open=(labview-8.6 %f >/dev/null 2>&1)&
regex/\.([Ll][Vv][Pp][Rr][Oo][Jj])$
Open=(labview-8.6 %f >/dev/null 2>&1)&
# The following code very ugly and should not be taken as example.
# It should be cleaned up when the new format of mc.ext is developed.
# html
regex/\.([hH][tT][mM][lL]?)$
#Open=(if test -n "" && test -n "$DISPLAY"; then ( file://%d/%p &) 1>&2; else links %f || lynx -force_html %f || ${PAGER:-more} %f; fi) 2>/dev/null
Open=(firefox %f &)
View=%view{ascii} links -dump %f 2>/dev/null || w3m -dump %f 2>/dev/null || lynx -dump -force_html %f
Edit=(geany %f &>/dev/null 2>&1 &)
# htm
regex/\.([hH][tT][mM]?)$
#Open=(if test -n "" && test -n "$DISPLAY"; then ( file://%d/%p &) 1>&2; else links %f || lynx -force_html %f || ${PAGER:-more} %f; fi) 2>/dev/null
Open=(firefox %f &)
View=%view{ascii} links -dump %f 2>/dev/null || w3m -dump %f 2>/dev/null || lynx -dump -force_html %f
Edit=(geany %f &>/dev/null 2>&1 &)
# swf
regex/\.([Ss][Ww][Ff]?)$
Open=(firefox %f >/dev/null 2)&
# StarOffice 5.2
shell/.sdw
Open=(lobase %f >/dev/null 2>&1)&
# StarOffice 6 and OpenOffice.org formats
regex/\.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg)$
Open=(lobase %f >/dev/null 2>&1)&
View=%view{ascii} odt2txt %f
# OpenOffice presentaion documents
regex/\.([Pp][Pp][Tt])$
Open=(loimpress %f >/dev/null 2>&1)&
# AbiWord
shell/.abw
Open=(abiword %f &)
# Microsoft Word Document
regex/\.([Dd][oO][cCtT]|[Ww][rR][iI])$
#Open=(abiword %f >/dev/null 2>&1 &)
Open=(lobase %f >/dev/null 2>&1)&
View=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f
type/^Microsoft\ Word
#Open=(abiword %f >/dev/null 2>&1 &)
Open=(lobase %f >/dev/null 2>&1)&
View=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f
# RTF document
regex/\.([rR][tT][fF])$
#Open=(abiword %f >/dev/null 2>&1 &)
Open=(lobase %f >/dev/null 2>&1)&
# Microsoft Excel Worksheet
regex/\.([xX][lL][sSwW])$
#Open=(gnumeric %f >/dev/null 2>&1 &)
Open=(lobase %f >/dev/null 2>&1)&
View=%view{ascii} xls2csv %f || strings %f
type/^Microsoft\ Excel
#Open=(gnumeric %f >/dev/null 2>&1 &)
Open=(lobase %f >/dev/null 2>&1)&
View=%view{ascii} xls2csv %f || strings %f
# Use OpenOffice.org to open any MS Office documents
type/^Microsoft\ Office\ Document
Open=(lobase %f >/dev/null 2>&1)&
# Framemaker
type/^FrameMaker
Open=fmclient -f %f
# DVI
regex/\.([dD][vV][iI])$
#Open=if [ x$DISPLAY = x ]; then dvisvga %f; else (evince %f &); fi
View=%view{ascii} dvi2tty %f
# TeX
regex/\.([Tt][Ee][Xx])$
Open=%var{EDITOR:vi} %f
# Lyx
regex/\.([Ll][Yy][Xx])$
Open=(lyx %f &>/dev/null)&
### Miscellaneous ###
# Makefile
regex/[Mm]akefile$
Open=make -f %f %{Enter parameters}
# Imakefile
shell/Imakefile
Open=xmkmf -a
# Makefile.PL (MakeMaker)
regex/^Makefile.(PL|pl)$
Open=%var{PERL:perl} %f
# dbf
regex/\.([dD][bB][fF])$
Open=%view{ascii} dbview %f
View=%view{ascii} dbview -b %f
# REXX script
regex/\.(rexx?|cmd)$
Open=rexx %f %{Enter parameters};echo "Press ENTER";read y
# Disk images for Commodore computers (VIC20, C64, C128)
regex/\.(d64|D64)$
Open=%cd %p/uc://1541
View=%view{ascii} c1541 %f -list
Extract=c1541 %f -extract
# Glade, a user interface designer for GTK+ and GNOME
regex/\.([Gg][Ll][Aa][Dd][Ee])$
Open=if glade-3 --version >/dev/null 2>&1; then (glade-3 %f >/dev/null 2>&1 &); else (glade-2 %f >/dev/null 2>&1 &); fi
### Plain compressed files ###
# ace
regex/\.(ace|ACE)$
Open=%cd %p/uace://
View=%view{ascii} unace l %f
Extract=unace x %f
# arc
regex/\.(arc|ARC)$
Open=%cd %p/uarc://
View=%view{ascii} arc l %f
Extract=arc x %f '*'
Extract (with flags)=I=%{Enter any Arc flags:}; if test -n "$I"; then arc x $I %f; fi
# zip
type/^([Zz][Ii][Pp])\ archive
Open=%cd %p/uzip://
View=%view{ascii} unzip -v %f
# zoo
regex/\.([Zz][Oo][Oo])$
Open=%cd %p/uzoo://
View=%view{ascii} zoo l %f
# gzip
type/^gzip
Open=gzip -dc %f | %var{PAGER:more}
View=%view{ascii} gzip -dc %f 2>/dev/null
regex/\.(gz|Z)?$
View=%view{ascii} gzip -dc %f 2>/dev/null
# bzip2
type/^bzip2
Open=bzip2 -dc %f | %var{PAGER:more}
View=%view{ascii} bzip2 -dc %f 2>/dev/null
regex/\.bz2?$
View=%view{ascii} bzip2 -dc %f 2>/dev/null
# bzip
type/^bzip
Open=bzip -dc %f | %var{PAGER:more}
View=%view{ascii} bzip -dc %f 2>/dev/null
# compress
type/^compress
Open=gzip -dc %f | %var{PAGER:more}
View=%view{ascii} gzip -dc %f 2>/dev/null
# lzma
regex/\.lzma$
Open=lzma -dc %f | %var{PAGER:more}
View=%view{ascii} lzma -dc %f 2>/dev/null
# xz
regex/\.xz$
Open=xz -dc %f | %var{PAGER:more}
View=%view{ascii} xz -dc %f 2>/dev/null
### Default ###
# Default target for anything not described above
default/*
Open=
View=
### EOF ###

View File

@ -1 +1,36 @@
[New Left Panel]
display=listing
reverse=false
case_sensitive=true
exec_first=false
sort_order=name
list_mode=full
brief_cols=2
user_format=half type name | size | perm
user_status0=half type name | size | perm
user_status1=half type name | size | perm
user_status2=half type name | size | perm
user_status3=half type name | size | perm
user_mini_status=false
list_format=full
[New Right Panel]
display=listing
reverse=false
case_sensitive=true
exec_first=false
sort_order=name
list_mode=full
brief_cols=2
user_format=half type name | size | perm
user_status0=half type name | size | perm
user_status1=half type name | size | perm
user_status2=half type name | size | perm
user_status3=half type name | size | perm
user_mini_status=false
list_format=full
[Dirs]
current_is_left=false
other_dir=/home/kolan

764
.dircolors Normal file
View File

@ -0,0 +1,764 @@
# Terminals {{{
TERM Eterm
TERM ansi
TERM color-xterm
TERM con132x25
TERM con132x30
TERM con132x43
TERM con132x60
TERM con80x25
TERM con80x28
TERM con80x30
TERM con80x43
TERM con80x50
TERM con80x60
TERM cons25
TERM console
TERM cygwin
TERM dtterm
TERM eterm-color
TERM gnome
TERM gnome-256color
TERM jfbterm
TERM konsole
TERM kterm
TERM linux
TERM linux-c
TERM mach-color
TERM mlterm
TERM putty
TERM rxvt
TERM rxvt-256color
TERM rxvt-cygwin
TERM rxvt-cygwin-native
TERM rxvt-unicode
TERM rxvt-unicode-256color
TERM rxvt-unicode256
TERM screen
TERM screen-256color
TERM screen-256color-bce
TERM screen-bce
TERM screen-w
TERM screen.Eterm
TERM screen.rxvt
TERM screen.linux
TERM st
TERM st-256color
TERM terminator
TERM vt100
TERM xterm
TERM xterm-16color
TERM xterm-256color
TERM xterm-88color
TERM xterm-color
TERM xterm-debian
# }}}
# Help on colors {{{
# Attr: 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text: 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# 256c: 38;5;0-255
# Back: 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
# 256c: 48;5;0-255 }}}
# Special files {{{
#NORMAL 00 # no color code at all
#FILE 00 # regular file: use no color at all
RESET 0 # reset to "normal" color
DIR 01;34 # directory
# LINK target # symbolic link.
LINK 01;36 # symbolic link.
MULTIHARDLINK 48;5;188 # regular file with more than one link
FIFO 01;45;37 # pipe
SOCK 01;45;36 # socket
DOOR 01;35 # door
BLK 01;43;33 # block device driver
CHR 01;46;33 # character device driver
ORPHAN 01;05;37;41 # orphaned syminks
MISSING 01;05;37;41 # ... and the files they point to
SETUID 37;41 # file that is setuid (u+s)
SETGID 30;43 # file that is setgid (g+s)
CAPABILITY 30;41 # file with capability
STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w)
OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky
STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable
EXEC 01;32 # This is for files with execute permission:
# }}}
# Vim-editable: code, text, etc... {{{
.alias 36
.ALIAS 36
.allow 36
.ALLOW 36
.am 36
.AM 36
.awk 36
.AWK 36
.ascii 36
.ASCII 36
.asm 36
.ASM 36
.bash 36
.BASH 36
.bashrc 36
.BASHRC 36
.bat 36
.BAT 36
.bff 36
.BFF 36
.c 36
.C 36
.c++ 36
.C++ 36
.cat 36
.CAT 36
.cc 36
.CC 36
.cert 36
.CERT 36
.cfg 36
.CFG 36
.cgi 36
.CGI 36
.cgl 36
.CGL 36
.cl 36
.CL 36
.cmake 36
.CMAKE 36
.cmd 36
.CMD 36
.cnf 36
.CNF 36
.conf 36
.CONF 36
.cpp 36
.CPP 36
.crc 36
.CRC 36
.crt 36
.CRT 36
.csh 36
.CSH 36
.csp 36
.CSP 36
.csr 36
.CSR 36
.css 36
.CSS 36
.csv 36
.CSV 36
.cu 36
.CU 36
.cxx 36
.CXX 36
.def 36
.DEF 36
.defs 36
.DEFS 36
.dep 36
.DEP 36
.desc 36
.DESC 36
.daily 36
.DAILY 36
.deny 36
.DENY 36
.diff 36
.DIFF 36
.diz 36
.DIZ 36
.ebuild 36
.EBUILD 36
.emacs 36
.EMACS 36
.env 36
.ENV 36
.exim 36
.EXIM 36
.fcgi 36
.FCGI 36
.geany 36
.GEANY 36
.h 36
.H 36
.hh 36
.HH 36
.hpp 36
.HPP 36
.htm 36
.HTM 36
.html 36
.HTML 36
.hourly 36
.HOURLY 36
.in 36
.IN 36
.inc 36
.INC 36
.inf 36
.INF 36
.info 36
.INFO 36
.ini 36
.INI 36
.java 36
.JAVA 36
.jhtm 36
.JHTM 36
.js 36
.JS 36
.latex 36
.LATEX 36
.layout 36
.LAYOUT 36
.lex 36
.LEX 36
.lisp 36
.LISP 36
.list 36
.LIST 36
.log 36
.LOG 36
.lst 36
.LST 36
.lua 36
.LUA 36
.make 36
.MAKE 36
.monthly 36
.MONTHLY 36
.out 36
.OUT 36
.pas 36
.PAS 36
.patch 36
.PATCH 36
.pc 36
.PC 36
.pem 36
.PEM 36
.perl 36
.PERL 36
.php 36
.PHP 36
.pl 36
.PL 36
.po 36
.PO 36
.pot 36
.POT 36
.py 36
.PY 36
.rb 36
.RB 36
.rc 36
.RC 36
.reg 36
.REG 36
.rhtml 36
.RHTML 36
.rsp 36
.RSP 36
.ruby 36
.RUBY 36
.sed 36
.SED 36
.sgml 36
.SGML 36
.sh 36
.SH 36
.sql 36
.SQL 36
.src 36
.SRC 36
.sty 36
.STY 36
.style 36
.STYLE 36
.tcc 36
.TCC 36
.tcsh 36
.TCSH 36
.tcl 36
.TCL 36
.tex 36
.TEX 36
.text 36
.TEXT 36
.txt 36
.TXT 36
.vala 36
.VALA 36
.vapi 36
.VAPI 36
.vb 36
.VB 36
.vbi 36
.VBI 36
.vim 36
.VIM 36
.weekly 36
.WEEKLY 36
.wsgi 36
.WSGI 36
.xml 36
.XML 36
.xhtm 36
.XHTM 36
.xhtml 36
.XHTML 36
.yml 36
.YML 36
.yaml 36
.YAML 36
.zh 36
.ZH 36
.zsh 36
.ZSH 36
.zshrc 36
.ZSHRC 36
#}}}
# Pictures and icons {{{
.ani 01;31
.ANI 01;31
.bmp 01;31
.BMP 01;31
.cdr 01;31
.CDR 01;31
.cur 01;31
.CUR 01;31
.eps 01;31
.EPS 01;31
.gif 01;31
.GIF 01;31
.ico 01;31
.ICO 01;31
.jpg 01;31
.JPG 01;31
.jpeg 01;31
.JPEG 01;31
.mng 01;31
.MNG 01;31
.pcx 01;31
.PCX 01;31
.pic 01;31
.PIC 01;31
.png 01;31
.PNG 01;31
.ppm 01;31
.PPM 01;31
.rgb 01;31
.RGB 01;31
.svg 01;31
.SVG 01;31
.svgz 01;31
.SVGZ 01;31
.tif 01;31
.TIF 01;31
.tiff 01;31
.TIFF 01;31
.xbm 01;31
.XBM 01;31
.xpm 01;31
.XPM 01;31
.wmf 01;31
.WMF 01;31
# }}}
# Emulator roms, emulator savegames {{{
.32x 01;33
.32X 01;33
.A64 01;33
.a64 01;33
.a00 01;33
.A00 01;33
.a52 01;33
.A52 01;33
.a64 01;33
.A64 01;33
.a78 01;33
.A78 01;33
.adf 01;33
.ADF 01;33
.atr 01;33
.ATR 01;33
.cdi 01;33
.CDI 01;33
.fm2 01;33
.FM2 01;33
.gb 01;33
.GB 01;33
.gba 01;33
.GBA 01;33
.gbc 01;33
.GBC 01;33
.gel 01;33
.GEL 01;33
.gg 01;33
.GG 01;33
.ggl 01;33
.GGL 01;33
.j64 01;33
.J64 01;33
.nds 01;33
.NDS 01;33
.nes 01;33
.NES 01;33
.rom 01;33
.ROM 01;33
.sav 01;33
.SAV 01;33
.sms 01;33
.SMS 01;33
.st 01;33
.ST 01;33
#}}}
# Disk images: iso, mdf, ... {{{
.image 01;33
.IMAGE 01;33
.img 01;33
.IMG 01;33
.iso 01;33
.ISO 01;33
.mdf 01;33
.MDF 01;33
.nrg 01;33
.NRG 01;33
.qcow 01;33
.QCOW 01;33
.vdi 01;33
.VDI 01;33
.vdmk 01;33
.VDMK 01;33
#}}}
# Video {{{
.3gp 01;35
.3GP 01;35
.asf 01;35
.ASF 01;35
.avi 01;35
.AVI 01;35
.bup 01;35
.BUP 01;35
.flv 01;35
.FLV 01;35
.ifo 01;35
.IFO 01;35
.m2v 01;35
.M2V 01;35
.mkv 01;35
.MKV 01;35
.mov 01;35
.MOV 01;35
.mp4 01;35
.MP4 01;35
.mpeg 01;35
.MPEG 01;35
.mpg 01;35
.MPG 01;35
.ogm 01;35
.OGM 01;35
.ogv 01;35
.OGV 01;35
.rmvb 01;35
.RMVB 01;35
.sample 01;35
.SAMPLE 01;35
.ts 01;301;35
.TS 01;35
.vob 01;35
.VOB 01;35
.webm 01;35
.WEBM 01;35
.wmv 01;35
.WMV 01;35
#}}}
# music, audio {{{
.aac 33
.AAC 33
.ape 33
.APE 33
.cue 33
.CUE 33
.dat 33
.DAT 33
.dts 33
.DTS 33
.fcm 33
.FCM 33
.flac 33
.FLAC 33
.m3u 33
.M3U 33
.m4 33
.M4 33
.m4a 33
.M4A 33
.mid 33
.MID 33
.midi 33
.MIDI 33
.mod 33
.MOD 33
.mp3 33
.MP3 33
.oga 33
.OGA 33
.ogg 33
.OGG 33
.plist 33
.PLIST 33
.pls 33
.PLS 33
.s3m 33
.S3M 33
.sid 33
.SID 33
.spl 33
.SPL 33
.wav 33
.WAV 33
.wma 33
.WMA 33
.wv 33
.WV 33
.wvc 33
.WVC 33
#}}}
# fonts {{{
.afm 01;34
.AFM 01;34
.pfb 01;34
.PFB 01;34
.pfm 01;34
.PFM 01;34
.ttf 01;34
.TTF 01;34
.pcf 01;34
.PCF 01;34
.psf 01;34
.PSF 01;34
#}}}
# backups, undo files, tempfiles {{{
.$$$ 01;30
.@@@ 01;30
.back 01;30
.BACK 01;30
.bak 01;30
.BAK 01;30
.bkp 01;30
.BKP 01;30
.chk 01;30
.CHK 01;30
.dbg 01;30
.DBG 01;30
.gdb 01;30
.GDB 01;30
.local 01;30
.LOCAL 01;30
.obj 01;30
.OBJ 01;30
.old 01;30
.OLD 01;30
.orig 01;30
.ORIG 01;30
.original 01;30
.ORIGINAL 01;30
.pch 01;30
.PCH 01;30
.pyc 01;30
.PYC 01;30
.rej 01;30
.REJ 01;30
.swo 01;30
.SWO 01;30
.swp 01;30
.SWP 01;30
.tds 01;30
.TDS 01;30
.tmp 01;30
.TMP 01;30
.tmpl 01;30
.TMPL 01;30
.un~ 01;30
.UN~ 01;30
.zcompdump 01;30
.ZCOMPDUMP 01;30
.zwc 01;30
.ZWC 01;30
#}}}
# databases {{{
.cdb 33
.CDB 33
.db 33
.DB 33
.dbt 33
.DBT 33
.dump 33
.DUMP 33
.mdb 33
.MDB 33
.pdb 33
.PDB 33
.sqlite 33
.SQLITE 33
.typelib 33
.TYPELIB 33
#}}}
# (compressed) archives {{{
.7z 31
.7Z 31
.a 31
.A 31
.apk 31
.APK 31
.arj 31
.ARJ 31
.bz2 31
.BZ2 31
.cpio 31
.CPIO 31
.deb 31
.DEB 31
.gz 31
.GZ 31
.ipk 31
.IPK 31
.jad 31
.JAD 31
.jar 31
.JAR 31
.lzma 31
.LZMA 31
.nth 31
.NTH 31
.pack 31
.PACK 31
.part 31
.PART 31
.rar 31
.RAR 31
.rpm 31
.RPM 31
.sfx 31
.SFX 31
.sis 31
.SIS 31
.tar 31
.TAR 31
.tgz 31
.TGZ 31
.xz 31
.XZ 31
.zip 31
.ZIP 31
#}}}
# Office files: pdf, lyx, Gimp, odf, etc ... {{{
.cbr 01;34
.CBR 01;34
.cbz 01;34
.CBZ 01;34
.chm 01;34
.CHM 01;34
.dfl 01;34
.DFL 01;34
.dia 01;34
.DIA 01;34
.djv 01;34
.DJV 01;34
.djvu 01;34
.DJVU 01;34
.doc 01;34
.DOC 01;34
.docx 01;34
.DOCX 01;34
.dvi 01;34
.DVI 01;34
.glade 01;34
.GLADE 01;34
.hlp 01;34
.HLP 01;34
.howto 01;34
.HOWTO 01;34
.lyx 01;34
.LYX 01;34
.mga 01;34
.MGA 01;34
.mht 01;34
.MHT 01;34
.ocp 01;34
.OCP 01;34
.odf 01;34
.ODF 01;34
.odt 01;34
.ODT 01;34
.ods 01;34
.ODS 01;34
.odp 01;34
.ODP 01;34
.odb 01;34
.ODB 01;34
.pdf 01;34
.PDF 01;34
.ppt 01;34
.PPT 01;34
.ps 01;34
.PS 01;34
.rfpdf 01;34
.RFPDF 01;34
.rtf 01;34
.RTF 01;34
.xcf 01;34
.XCF 01;34
.xls 01;34
.XLS 01;34
# }}}
# Other file types {{{
.ac 01;35 # AutoCAD file
.AC 01;35 # AutoCAD file
.acm 01;30 # Windows system file
.ACM 01;30 # Windows system file
.app 01;32
.APP 01;32
.com 01;32
.COM 01;32
.exe 01;32
.EXE 01;32
.jam 01;32 # Java executable
.JAM 01;32 # Java executable
.jar 01;32 # Java executable
.JAR 01;32 # Java executable
.lvlib 02;35 # LabVIEW file
.LVLIB 02;35 # LabVIEW file
.lvproj 02;35 # LabVIEW file
.LVPROJ 02;35 # LabVIEW file
.msi 01;32
.MSI 01;32
.pid 31
.PID 31
.pk 35 # Adobe Audition
.PK 35 # Adobe Audition
.rtexe 01;32 # LabVIEW RT-executable file
.RTEXE 01;32 # LabVIEW RT-executable file
.swf 01;35 # Adobe Flesh
.SWF 01;35 # Adobe Flesh
.torrent 32
.TORRENT 32
.vi 01;35 # LabVIEW file
.VI 01;35 # LabVIEW file
.xpi 35
.XPI 35
# }}}
# vim: set ft=dircolors fdm=marker et sw=2:

764
.dircolors_256 Normal file
View File

@ -0,0 +1,764 @@
# Terminals {{{
TERM Eterm
TERM ansi
TERM color-xterm
TERM con132x25
TERM con132x30
TERM con132x43
TERM con132x60
TERM con80x25
TERM con80x28
TERM con80x30
TERM con80x43
TERM con80x50
TERM con80x60
TERM cons25
TERM console
TERM cygwin
TERM dtterm
TERM eterm-color
TERM gnome
TERM gnome-256color
TERM jfbterm
TERM konsole
TERM kterm
TERM linux
TERM linux-c
TERM mach-color
TERM mlterm
TERM putty
TERM rxvt
TERM rxvt-256color
TERM rxvt-cygwin
TERM rxvt-cygwin-native
TERM rxvt-unicode
TERM rxvt-unicode-256color
TERM rxvt-unicode256
TERM screen
TERM screen-256color
TERM screen-256color-bce
TERM screen-bce
TERM screen-w
TERM screen.Eterm
TERM screen.rxvt
TERM screen.linux
TERM st
TERM st-256color
TERM terminator
TERM vt100
TERM xterm
TERM xterm-16color
TERM xterm-256color
TERM xterm-88color
TERM xterm-color
TERM xterm-debian
# }}}
# Help on colors {{{
# Attr: 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text: 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# 256c: 38;5;0-255
# Back: 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
# 256c: 48;5;0-255 }}}
# Special files {{{
#NORMAL 00 # no color code at all
#FILE 00 # regular file: use no color at all
RESET 0 # reset to "normal" color
DIR 01;34 # directory
# LINK target # symbolic link.
LINK 01;36 # symbolic link.
MULTIHARDLINK 48;5;188 # regular file with more than one link
FIFO 48;5;91 # pipe
SOCK 48;5;89 # socket
DOOR 01;35 # door
BLK 48;5;237;38;5;214 # block device driver
CHR 48;5;67;38;5;229 # character device driver
ORPHAN 01;05;37;41 # orphaned syminks
MISSING 01;05;37;41 # ... and the files they point to
SETUID 48;5;1;38;5;46 # file that is setuid (u+s)
SETGID 48;5;5;38;5;46 # file that is setgid (g+s)
CAPABILITY 30;41 # file with capability
STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w)
OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky
STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable
EXEC 01;32 # This is for files with execute permission:
# }}}
# Vim-editable: code, text, etc... {{{
.alias 38;5;45
.ALIAS 38;5;45
.allow 38;5;45
.ALLOW 38;5;45
.am 38;5;45
.AM 38;5;45
.awk 38;5;45
.AWK 38;5;45
.ascii 38;5;45
.ASCII 38;5;45
.asm 38;5;45
.ASM 38;5;45
.bash 38;5;45
.BASH 38;5;45
.bashrc 38;5;45
.BASHRC 38;5;45
.bat 38;5;45
.BAT 38;5;45
.bff 38;5;45
.BFF 38;5;45
.c 38;5;45
.C 38;5;45
.c++ 38;5;45
.C++ 38;5;45
.cat 38;5;45
.CAT 38;5;45
.cc 38;5;45
.CC 38;5;45
.cert 38;5;45
.CERT 38;5;45
.cfg 38;5;45
.CFG 38;5;45
.cgi 38;5;45
.CGI 38;5;45
.cgl 38;5;45
.CGL 38;5;45
.cl 38;5;45
.CL 38;5;45
.cmake 38;5;45
.CMAKE 38;5;45
.cmd 38;5;45
.CMD 38;5;45
.cnf 38;5;45
.CNF 38;5;45
.conf 38;5;45
.CONF 38;5;45
.cpp 38;5;45
.CPP 38;5;45
.crc 38;5;45
.CRC 38;5;45
.crt 38;5;45
.CRT 38;5;45
.csh 38;5;45
.CSH 38;5;45
.csp 38;5;45
.CSP 38;5;45
.csr 38;5;45
.CSR 38;5;45
.css 38;5;45
.CSS 38;5;45
.csv 38;5;45
.CSV 38;5;45
.cu 38;5;45
.CU 38;5;45
.cxx 38;5;45
.CXX 38;5;45
.def 38;5;45
.DEF 38;5;45
.defs 38;5;45
.DEFS 38;5;45
.dep 38;5;45
.DEP 38;5;45
.desc 38;5;45
.DESC 38;5;45
.daily 38;5;45
.DAILY 38;5;45
.deny 38;5;45
.DENY 38;5;45
.diff 38;5;45
.DIFF 38;5;45
.diz 38;5;45
.DIZ 38;5;45
.ebuild 38;5;45
.EBUILD 38;5;45
.emacs 38;5;45
.EMACS 38;5;45
.env 38;5;45
.ENV 38;5;45
.exim 38;5;45
.EXIM 38;5;45
.fcgi 38;5;45
.FCGI 38;5;45
.geany 38;5;45
.GEANY 38;5;45
.h 38;5;45
.H 38;5;45
.hh 38;5;45
.HH 38;5;45
.hpp 38;5;45
.HPP 38;5;45
.htm 38;5;45
.HTM 38;5;45
.html 38;5;45
.HTML 38;5;45
.hourly 38;5;45
.HOURLY 38;5;45
.in 38;5;45
.IN 38;5;45
.inc 38;5;45
.INC 38;5;45
.inf 38;5;45
.INF 38;5;45
.info 38;5;45
.INFO 38;5;45
.ini 38;5;45
.INI 38;5;45
.java 38;5;45
.JAVA 38;5;45
.jhtm 38;5;45
.JHTM 38;5;45
.js 38;5;45
.JS 38;5;45
.latex 38;5;45
.LATEX 38;5;45
.layout 38;5;45
.LAYOUT 38;5;45
.lex 38;5;45
.LEX 38;5;45
.lisp 38;5;45
.LISP 38;5;45
.list 38;5;45
.LIST 38;5;45
.log 38;5;45
.LOG 38;5;45
.lst 38;5;45
.LST 38;5;45
.lua 38;5;45
.LUA 38;5;45
.make 38;5;45
.MAKE 38;5;45
.monthly 38;5;45
.MONTHLY 38;5;45
.out 38;5;45
.OUT 38;5;45
.pas 38;5;45
.PAS 38;5;45
.patch 38;5;45
.PATCH 38;5;45
.pc 38;5;45
.PC 38;5;45
.pem 38;5;45
.PEM 38;5;45
.perl 38;5;45
.PERL 38;5;45
.php 38;5;45
.PHP 38;5;45
.pl 38;5;45
.PL 38;5;45
.po 38;5;45
.PO 38;5;45
.pot 38;5;45
.POT 38;5;45
.py 38;5;45
.PY 38;5;45
.rb 38;5;45
.RB 38;5;45
.rc 38;5;45
.RC 38;5;45
.reg 38;5;45
.REG 38;5;45
.rhtml 38;5;45
.RHTML 38;5;45
.rsp 38;5;45
.RSP 38;5;45
.ruby 38;5;45
.RUBY 38;5;45
.sed 38;5;45
.SED 38;5;45
.sgml 38;5;45
.SGML 38;5;45
.sh 38;5;45
.SH 38;5;45
.sql 38;5;45
.SQL 38;5;45
.src 38;5;45
.SRC 38;5;45
.sty 38;5;45
.STY 38;5;45
.style 38;5;45
.STYLE 38;5;45
.tcc 38;5;45
.TCC 38;5;45
.tcsh 38;5;45
.TCSH 38;5;45
.tcl 38;5;45
.TCL 38;5;45
.tex 38;5;45
.TEX 38;5;45
.text 38;5;45
.TEXT 38;5;45
.txt 38;5;45
.TXT 38;5;45
.vala 38;5;45
.VALA 38;5;45
.vapi 38;5;45
.VAPI 38;5;45
.vb 38;5;45
.VB 38;5;45
.vbi 38;5;45
.VBI 38;5;45
.vim 38;5;45
.VIM 38;5;45
.weekly 38;5;45
.WEEKLY 38;5;45
.wsgi 38;5;45
.WSGI 38;5;45
.xml 38;5;45
.XML 38;5;45
.xhtm 38;5;45
.XHTM 38;5;45
.xhtml 38;5;45
.XHTML 38;5;45
.yml 38;5;45
.YML 38;5;45
.yaml 38;5;45
.YAML 38;5;45
.zh 38;5;45
.ZH 38;5;45
.zsh 38;5;45
.ZSH 38;5;45
.zshrc 38;5;45
.ZSHRC 38;5;45
#}}}
# Pictures and icons {{{
.ani 38;5;205
.ANI 38;5;205
.bmp 38;5;205
.BMP 38;5;205
.cdr 38;5;205
.CDR 38;5;205
.cur 38;5;205
.CUR 38;5;205
.eps 38;5;205
.EPS 38;5;205
.gif 38;5;205
.GIF 38;5;205
.ico 38;5;205
.ICO 38;5;205
.jpg 38;5;205
.JPG 38;5;205
.jpeg 38;5;205
.JPEG 38;5;205
.mng 38;5;205
.MNG 38;5;205
.pcx 38;5;205
.PCX 38;5;205
.pic 38;5;205
.PIC 38;5;205
.png 38;5;205
.PNG 38;5;205
.ppm 38;5;205
.PPM 38;5;205
.rgb 38;5;205
.RGB 38;5;205
.svg 38;5;205
.SVG 38;5;205
.svgz 38;5;205
.SVGZ 38;5;205
.tif 38;5;205
.TIF 38;5;205
.tiff 38;5;205
.TIFF 38;5;205
.xbm 38;5;205
.XBM 38;5;205
.xpm 38;5;205
.XPM 38;5;205
.wmf 38;5;205
.WMF 38;5;205
# }}}
# Emulator roms, emulator savegames {{{
.32x 38;5;136
.32X 38;5;136
.A64 38;5;136
.a64 38;5;136
.a00 38;5;136
.A00 38;5;136
.a52 38;5;136
.A52 38;5;136
.a64 38;5;136
.A64 38;5;136
.a78 38;5;136
.A78 38;5;136
.adf 38;5;136
.ADF 38;5;136
.atr 38;5;136
.ATR 38;5;136
.cdi 38;5;136
.CDI 38;5;136
.fm2 38;5;136
.FM2 38;5;136
.gb 38;5;136
.GB 38;5;136
.gba 38;5;136
.GBA 38;5;136
.gbc 38;5;136
.GBC 38;5;136
.gel 38;5;136
.GEL 38;5;136
.gg 38;5;136
.GG 38;5;136
.ggl 38;5;136
.GGL 38;5;136
.j64 38;5;136
.J64 38;5;136
.nds 38;5;136
.NDS 38;5;136
.nes 38;5;136
.NES 38;5;136
.rom 38;5;136
.ROM 38;5;136
.sav 38;5;136
.SAV 38;5;136
.sms 38;5;136
.SMS 38;5;136
.st 38;5;136
.ST 38;5;136
#}}}
# Disk images: iso, mdf, ... {{{
.image 38;5;214
.IMAGE 38;5;214
.img 38;5;214
.IMG 38;5;214
.iso 38;5;214
.ISO 38;5;214
.mdf 38;5;214
.MDF 38;5;214
.nrg 38;5;214
.NRG 38;5;214
.qcow 38;5;214
.QCOW 38;5;214
.vdi 38;5;214
.VDI 38;5;214
.vdmk 38;5;214
.VDMK 38;5;214
#}}}
# Video {{{
.3gp 38;5;165
.3GP 38;5;165
.asf 38;5;165
.ASF 38;5;165
.avi 38;5;165
.AVI 38;5;165
.bup 38;5;165
.BUP 38;5;165
.flv 38;5;165
.FLV 38;5;165
.ifo 38;5;165
.IFO 38;5;165
.m2v 38;5;165
.M2V 38;5;165
.mkv 38;5;165
.MKV 38;5;165
.mov 38;5;165
.MOV 38;5;165
.mp4 38;5;165
.MP4 38;5;165
.mpeg 38;5;165
.MPEG 38;5;165
.mpg 38;5;165
.MPG 38;5;165
.ogm 38;5;165
.OGM 38;5;165
.ogv 38;5;165
.OGV 38;5;165
.rmvb 38;5;165
.RMVB 38;5;165
.sample 38;5;165
.SAMPLE 38;5;165
.ts 38;5;165
.TS 38;5;165
.vob 38;5;165
.VOB 38;5;165
.webm 38;5;165
.WEBM 38;5;165
.wmv 38;5;165
.WMV 38;5;165
#}}}
# music, audio {{{
.aac 38;5;208
.AAC 38;5;208
.ape 38;5;208
.APE 38;5;208
.cue 38;5;208
.CUE 38;5;208
.dat 38;5;208
.DAT 38;5;208
.dts 38;5;208
.DTS 38;5;208
.fcm 38;5;208
.FCM 38;5;208
.flac 38;5;208
.FLAC 38;5;208
.m3u 38;5;208
.M3U 38;5;208
.m4 38;5;208
.M4 38;5;208
.m4a 38;5;208
.M4A 38;5;208
.mid 38;5;208
.MID 38;5;208
.midi 38;5;208
.MIDI 38;5;208
.mod 38;5;208
.MOD 38;5;208
.mp3 38;5;208
.MP3 38;5;208
.oga 38;5;208
.OGA 38;5;208
.ogg 38;5;208
.OGG 38;5;208
.plist 38;5;208
.PLIST 38;5;208
.pls 38;5;208
.PLS 38;5;208
.s3m 38;5;208
.S3M 38;5;208
.sid 38;5;208
.SID 38;5;208
.spl 38;5;208
.SPL 38;5;208
.wav 38;5;208
.WAV 38;5;208
.wma 38;5;208
.WMA 38;5;208
.wv 38;5;208
.WV 38;5;208
.wvc 38;5;208
.WVC 38;5;208
#}}}
# fonts {{{
.afm 38;5;99
.AFM 38;5;99
.pfb 38;5;99
.PFB 38;5;99
.pfm 38;5;99
.PFM 38;5;99
.ttf 38;5;99
.TTF 38;5;99
.pcf 38;5;99
.PCF 38;5;99
.psf 38;5;99
.PSF 38;5;99
#}}}
# backups, undo files, tempfiles {{{
.$$$ 38;5;240
.@@@ 38;5;240
.back 38;5;240
.BACK 38;5;240
.bak 38;5;240
.BAK 38;5;240
.bkp 38;5;240
.BKP 38;5;240
.chk 38;5;240
.CHK 38;5;240
.dbg 38;5;240
.DBG 38;5;240
.gdb 38;5;240
.GDB 38;5;240
.local 38;5;240
.LOCAL 38;5;240
.obj 38;5;240
.OBJ 38;5;240
.old 38;5;240
.OLD 38;5;240
.orig 38;5;240
.ORIG 38;5;240
.original 38;5;240
.ORIGINAL 38;5;240
.pch 38;5;240
.PCH 38;5;240
.pyc 38;5;240
.PYC 38;5;240
.rej 38;5;240
.REJ 38;5;240
.swo 38;5;240
.SWO 38;5;240
.swp 38;5;240
.SWP 38;5;240
.tds 38;5;240
.TDS 38;5;240
.tmp 38;5;240
.TMP 38;5;240
.tmpl 38;5;240
.TMPL 38;5;240
.un~ 38;5;240
.UN~ 38;5;240
.zcompdump 38;5;240
.ZCOMPDUMP 38;5;240
.zwc 38;5;240
.ZWC 38;5;240
#}}}
# databases {{{
.cdb 38;5;100
.CDB 38;5;100
.db 38;5;100
.DB 38;5;100
.dbt 38;5;100
.DBT 38;5;100
.dump 38;5;100
.DUMP 38;5;100
.mdb 38;5;100
.MDB 38;5;100
.pdb 38;5;100
.PDB 38;5;100
.sqlite 38;5;100
.SQLITE 38;5;100
.typelib 38;5;100
.TYPELIB 38;5;100
#}}}
# (compressed) archives {{{
.7z 38;5;88
.7Z 38;5;88
.a 38;5;88
.A 38;5;88
.apk 38;5;88
.APK 38;5;88
.arj 38;5;88
.ARJ 38;5;88
.bz2 38;5;88
.BZ2 38;5;88
.cpio 38;5;88
.CPIO 38;5;88
.deb 38;5;88
.DEB 38;5;88
.gz 38;5;88
.GZ 38;5;88
.ipk 38;5;88
.IPK 38;5;88
.jad 38;5;88
.JAD 38;5;88
.jar 38;5;88
.JAR 38;5;88
.lzma 38;5;88
.LZMA 38;5;88
.nth 38;5;88
.NTH 38;5;88
.pack 38;5;88
.PACK 38;5;88
.part 38;5;88
.PART 38;5;88
.rar 38;5;88
.RAR 38;5;88
.rpm 38;5;88
.RPM 38;5;88
.sfx 38;5;88
.SFX 38;5;88
.sis 38;5;88
.SIS 38;5;88
.tar 38;5;88
.TAR 38;5;88
.tgz 38;5;88
.TGZ 38;5;88
.xz 38;5;88
.XZ 38;5;88
.zip 38;5;88
.ZIP 38;5;88
#}}}
# Office files: pdf, lyx, Gimp, odf, etc ... {{{
.cbr 38;5;75
.CBR 38;5;75
.cbz 38;5;75
.CBZ 38;5;75
.chm 38;5;75
.CHM 38;5;75
.dfl 38;5;75
.DFL 38;5;75
.dia 38;5;75
.DIA 38;5;75
.djv 38;5;75
.DJV 38;5;75
.djvu 38;5;75
.DJVU 38;5;75
.doc 38;5;75
.DOC 38;5;75
.docx 38;5;75
.DOCX 38;5;75
.dvi 38;5;75
.DVI 38;5;75
.glade 38;5;75
.GLADE 38;5;75
.hlp 38;5;75
.HLP 38;5;75
.howto 38;5;75
.HOWTO 38;5;75
.lyx 38;5;75
.LYX 38;5;75
.mga 38;5;75
.MGA 38;5;75
.mht 38;5;75
.MHT 38;5;75
.ocp 38;5;75
.OCP 38;5;75
.odf 38;5;75
.ODF 38;5;75
.odt 38;5;75
.ODT 38;5;75
.ods 38;5;75
.ODS 38;5;75
.odp 38;5;75
.ODP 38;5;75
.odb 38;5;75
.ODB 38;5;75
.pdf 38;5;75
.PDF 38;5;75
.ppt 38;5;75
.PPT 38;5;75
.ps 38;5;75
.PS 38;5;75
.rfpdf 38;5;75
.RFPDF 38;5;75
.rtf 38;5;75
.RTF 38;5;75
.xcf 38;5;75
.XCF 38;5;75
.xls 38;5;75
.XLS 38;5;75
# }}}
# Other file types {{{
.ac 38;5;139 # AutoCAD file
.AC 38;5;139 # AutoCAD file
.acm 38;5;240 # Windows system file
.ACM 38;5;240 # Windows system file
.app 01;32
.APP 01;32
.com 01;32
.COM 01;32
.exe 01;32
.EXE 01;32
.jam 01;32 # Java executable
.JAM 01;32 # Java executable
.jar 01;32 # Java executable
.JAR 01;32 # Java executable
.lvlib 38;5;131 # LabVIEW file
.LVLIB 38;5;131 # LabVIEW file
.lvproj 38;5;131 # LabVIEW file
.LVPROJ 38;5;131 # LabVIEW file
.msi 01;32
.MSI 01;32
.pid 38;5;124
.PID 38;5;124
.pk 38;5;139 # Adobe Audition
.PK 38;5;139 # Adobe Audition
.rtexe 01;32 # LabVIEW RT-executable file
.RTEXE 01;32 # LabVIEW RT-executable file
.swf 38;5;139 # Adobe Flesh
.SWF 38;5;139 # Adobe Flesh
.torrent 38;5;112
.TORRENT 38;5;112
.vi 38;5;165 # LabVIEW file
.VI 38;5;165 # LabVIEW file
.xpi 38;5;167
.XPI 38;5;167
# }}}
# vim: set ft=dircolors fdm=marker et sw=2:

View File

@ -1,6 +1,6 @@
[user] [user]
email = mecareful@gmail.com email = backbone@backbone.ws
name = Kolan Sh name = Kolan Sh
[color] [color]
ui = auto ui = auto
@ -14,30 +14,25 @@
remote = green remote = green
[color "diff"] [color "diff"]
meta = yellow bold meta = yellow
frag = magenta bold # frag = magenta bold
old = red bold # old = red bold
new = green bold # new = green bold
[color "status"] [color "status"]
added = yellow added = yellow
changed = green changed = green
untracked = cyan untracked = cyan
[color "decorate"]
tag = magenta
[alias] [alias]
unstage = reset HEAD --
st = status st = status
s = status -uno s = status -uno
ci = commit ci = commit
di = diff -b
co = checkout co = checkout
up = checkout glog = log --graph --stat --decorate
update = checkout
l = log
hgrevert = checkout
strip = reset --hard
branches = branch -a
pull = fetch
[instaweb] [instaweb]
local = true local = true
@ -47,3 +42,26 @@
[merge] [merge]
tool = vimdiff tool = vimdiff
[core]
quotepath = false
[push]
default = matching
[difftool]
prompt = false
[diff]
tool = vimdiff
[mergetool "vimdiff"]
keepBackup = false
#[http]
# sslverify = false
#[branch]
# autoSetupMerge = always
[pager]
branch = false

35
.hgrc
View File

@ -1,7 +1,10 @@
[ui] [ui]
username = Kolan Sh <mecareful@gmail.com> username = Kolan Sh <backbone@backbone.ws>
[hostfingerprints] [hostfingerprints]
bitbucket.org=3f:d3:c5:17:23:3c:cd:f5:2d:17:76:06:93:7e:ee:97:42:21:14:aa
hg.backbone.ws=1d:5d:e2:95:c6:ee:1a:63:9a:9b:09:79:f6:30:a9:2a:50:7d:4e:09
hg.insysltd.ru=ec:ff:06:cf:59:88:ae:58:eb:f4:79:30:56:f7:36:c2:dd:52:a9:41
[ui] [ui]
verbose = true verbose = true
@ -19,10 +22,13 @@ cmd.cdiff = colordiff
opts.cdiff = -uprN opts.cdiff = -uprN
[extensions] [extensions]
duckcharset = ~/.hgext/duckcharset/hgext/duckcharset.py #duckcharset = ~/.hgext/duckcharset/hgext/duckcharset.py
onsub= ~/.hgext/onsub/onsub.py #onsub= ~/.hgext/onsub/onsub.py
compass = ~/.hgext/compass/compass.py #compass = ~/.hgext/compass/compass.py
hggit = ~/.hgext/hg-git/hggit #hggit = ~/.hgext/hg-git/hggit
#hgshelve = ~/.hgext/hgshelve/hgshelve.py
#histedit = ~/.hgext/histedit/hg_histedit.py
#hgext.hgshelve=
# fixcase = ~/.hgext/fixcase/fixcase.py # fixcase = ~/.hgext/fixcase/fixcase.py
hgext.bookmarks = hgext.bookmarks =
eol = eol =
@ -37,7 +43,7 @@ record=
fetch= fetch=
convert= convert=
# brokes .hgignore (for example in /.hg) # brokes .hgignore (for example in /.hg)
#largefiles = largefiles =
pager = pager =
parentrevspec = parentrevspec =
progress = progress =
@ -47,6 +53,11 @@ relink =
schemes= schemes=
mq = mq =
churn = churn =
#journal =
shelve=
[patch]
eol = auto
[web] [web]
pygments_style=tango pygments_style=tango
@ -64,6 +75,7 @@ cacerts=
[largefiles] [largefiles]
minsize = 1 minsize = 1
usercache = ~/.hg-largefiles
[pager] [pager]
pager = LESS='FSRX' less pager = LESS='FSRX' less
@ -78,6 +90,13 @@ clear-complete = True
disable = False disable = False
assume-tty = False assume-tty = False
[alias]
s = status -mard -S
[subpaths] [subpaths]
http[s]?://(.*)/(.*)/../(.*) = https://\1/\2/\3 # step 2
http[s]?://(.*)/(.*)/(.*) = https://\1/\2/../\3 ([^/@]+)/@@/([^/@]+)$ = \1/@@@/\2
# step 1
([^/@]+)/([^/@]+)$ = \1/@@/\2
# step 2
([^/@]+)/@@@/([^/@]+)$ = \2

23
.htoprc
View File

@ -1,23 +0,0 @@
# Beware! This file is rewritten every time htop exits.
# The parser is also very primitive, and not human-friendly.
# (I know, it's in the todo list).
fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=39
sort_direction=1
hide_threads=0
hide_kernel_threads=0
hide_userland_threads=0
shadow_other_users=1
show_thread_names=1
highlight_base_name=1
highlight_megabytes=1
highlight_threads=1
tree_view=1
header_margin=1
detailed_cpu_time=1
color_scheme=0
delay=15
left_meters=AllCPUs Memory Swap CPU
left_meter_modes=1 1 1 1
right_meters=Tasks LoadAverage Uptime Clock Memory Battery
right_meter_modes=2 2 2 2 2 2

View File

@ -1,22 +1,27 @@
# This file is automatically generated by Links -- please do not edit. # This file is automatically generated by Links -- please do not edit.
async_dns 1 download_dir ""
download_utime 0 language "Russian"
max_connections 10 max_connections 10
max_connections_to_host 8 max_connections_to_host 8
retries 3 retries 3
receive_timeout 120 receive_timeout 120
unrestartable_receive_timeout 600 unrestartable_receive_timeout 600
bind_address ""
bind_address_ipv6 ""
async_dns 1
download_utime 0
format_cache_size 5 format_cache_size 5
memory_cache_size 1M memory_cache_size 1M
image_cache_size 1M image_cache_size 1M
font_cache_size 2M font_cache_size 2M
http_bugs.aggressive_cache 1
ipv6.address_preference 0
http_proxy "" http_proxy ""
ftp_proxy "" ftp_proxy ""
https_proxy ""
socks_proxy "" socks_proxy ""
-append_text_to_dns_lookups "" append_text_to_dns_lookups ""
only_proxies 0 only_proxies 0
download_dir ""
language "Russian"
http_bugs.http10 0 http_bugs.http10 0
http_bugs.allow_blacklist 1 http_bugs.allow_blacklist 1
http_bugs.bug_302_redirect 1 http_bugs.bug_302_redirect 1
@ -24,13 +29,13 @@ http_bugs.bug_post_no_keepalive 0
http_bugs.no_accept_charset 0 http_bugs.no_accept_charset 0
http_bugs.no_compression 0 http_bugs.no_compression 0
http_bugs.retry_internal_errors 0 http_bugs.retry_internal_errors 0
http_bugs.aggressive_cache 1
http_referer 0 http_referer 0
fake_referer "" fake_referer ""
fake_useragent "" fake_useragent ""
http.extra_header "" http.extra_header ""
ftp.anonymous_password "somebody@host.domain" ftp.anonymous_password "somebody@host.domain"
ftp.use_passive 0 ftp.use_passive 0
ftp.use_eprt_epsv 0
ftp.fast 0 ftp.fast 0
ftp.set_iptos 1 ftp.set_iptos 1
menu_font_size 16 menu_font_size 16
@ -39,28 +44,22 @@ foreground_color 0
scroll_bar_area_color 12632256 scroll_bar_area_color 12632256
scroll_bar_bar_color 0 scroll_bar_bar_color 0
scroll_bar_frame_color 0 scroll_bar_frame_color 0
bookmarks_codepage us-ascii
bookmarks_file "/home/kolan/.links/bookmarks.html"
display_red_gamma 2.2000 display_red_gamma 2.2000
display_green_gamma 2.2000 display_green_gamma 2.2000
display_blue_gamma 2.2000 display_blue_gamma 2.2000
user_gamma 1.0000 user_gamma 1.0000
bfu_aspect 1.0000 bfu_aspect 1.0000
aspect_on 1 aspect_on 1
display_optimize 0
dither_letters 1 dither_letters 1
dither_images 1 dither_images 1
display_optimize 0
gamma_correction 2 gamma_correction 2
enable_javascript 1 overwrite_instead_of_scroll 1
verbose_javascript_errors 0
verbose_javascript_warnings 0
enable_all_conversions 1
enable_global_resolution 1
javascript_manual_confirmation 1
js_recursion_depth 100
js_memory_limit 5k
bookmarks_codepage us-ascii
bookmarks_file "/home/kolan/.links/bookmarks.html"
terminal "rxvt-unicode" 0 1 0 koi8-r terminal "rxvt-unicode" 0 1 0 koi8-r
terminal "rxvt" 0 1 0 utf-8 terminal "rxvt" 0 1 0 utf-8
terminal "screen-256color" 0 1 0 utf-8
extension "aif,aiff,aifc" "audio/x-aiff" extension "aif,aiff,aifc" "audio/x-aiff"
extension "au,snd" "audio/basic" extension "au,snd" "audio/basic"
extension "avi" "video/x-msvideo" extension "avi" "video/x-msvideo"

111
.nanorc Normal file
View File

@ -0,0 +1,111 @@
set autoindent
set boldtext
set const
set historylog
set morespace
set smooth
set regexp
set fill 72
set multibuffer
set suspend
syntax "pkgbuild" "^.*PKGBUILD$"
color green start="^" end="$"
color cyan "^.*(pkgname|pkgver|pkgrel|pkgdesc|force|url|license|install|source|md5sums|groups|backup|depends|makedepends|conflicts|provides|replaces).*=.*$"
color brightcyan "\<(pkgname|pkgver|pkgrel|pkgdesc|force|url|license|install|source|md5sums|groups|backup|depends|makedepends|conflicts|provides|replaces)\>"
color cyan "\.install"
color brightwhite "=" "'" "\(" "\)" "\"" "#.*$" "\," "\{" "\}"
color brightcyan "(\$|\$\{|\$\()(pkgname|pkgver|pkgrel|pkgdesc|force|url|license|install|source|md5sums|groups|backup|depends|makedepends|conflicts|provides|replaces|startdir)(|\}|\))"
color brightred "build\(\)"
color brightred "\<(configure|make)\>"
color red "\<(DESTDIR|PREFIX|prefix|sysconfdir|datadir|libdir|includedir|mandir)\>"
syntax "c-file" "\.(c|h)$"
color red "\<[A-Z_]{2,}\>"
color green "\<(float|char|int|void|static|const|struct)\>"
color brightyellow "\<(if|while|do|else|case|switch)\>"
color brightcyan "^#( )*(define|include|ifn?def|endif|elif|else|if)"
syntax "php" "\.php[2345s~]?$"
color brightblue "(.*)\("
color blue "\$[a-zA-Z_0-9$]*|[=!<>]"
color green "(var|class|function|echo|case|break|default|exit|switch|if|else|elseif|@|while)\s"
color green "[.,{}();]"
color red "('.*')|(\".*\")"
color brightyellow "(#.*|//.*)$"
color brightyellow start="/\*" end="\*/"
color brightblue "(<\?(php)?|\?>)"
color white start="\?>" end="<\?(php)?"
syntax "HTML" "\.html$"
color blue start="<" end=">"
color red "&[^; ]*;"
syntax "patch" "\.(patch|diff)$"
color brightgreen "^\+.*"
color green "^\+\+\+.*"
color brightblue "^ .*"
color brightred "^-.*"
color red "^---.*"
color brightyellow "^@@.*"
color magenta "^diff.*"
syntax "Java source" "\.java$"
color green "\<(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\>"
color red "\<(break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\>"
color cyan "\<(abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\>"
color red ""[^\"]*""
color yellow "\<(true|false|null)\>"
color blue "//.*"
color blue start="/\*" end="\*/"
color brightblue start="/\*\*" end="\*/"
color brightgreen,green " +$"
syntax "ml" ".*\.([jrs]?html?|xml|sgml?)$"
color white "^.+$"
color green start="<" end=">"
color cyan "<[^> ]+"
color cyan ">"
color yellow start="<!DOCTYPE" end="[/]?>"
color yellow start="<!--" end="-->"
color red "&[^;]*;"
## syntax highlighting in xorg.conf
##
syntax "xorg" "xorg\.conf$"
color brightwhite "(Section|EndSection|Sub[sS]ection|EndSub[sS]ection)"
# keywords
color yellow "[^A-Za-z0-9](Identifier|Screen|InputDevice|Option|RightOf|LeftOf|Driver|RgbPath|FontPath|ModulePath|Load|VendorName|ModelName|BoardName|BusID|Device|Monitor|DefaultDepth|View[pP]ort|Depth|Virtual|Modes|Mode|DefaultColorDepth|Modeline|\+vsync|\+hsync|HorizSync|VertRefresh)[^A-Za-z0-9]"
# numbers
color magenta "[0-9]"
# strings
color green ""(\\.|[^\"])*""
# comments
color white "#.*"
# Generic conf/rc/sh file syntax highlighting
#############################################
syntax "conf/rc/sh" "conf$|rc$|sh$"
color white ".+"
color green "^#.*"
# .nanorc syntax highlighting
#############################
syntax "nanorc" "[\.]*nanorc$"
color white "^ *(set|unset).*$"
color cyan "^ *(set|unset) (autoindent|backup|const|cut|fill|keypad|multibuffer|noconvert|nofollow|nohelp|nowrap|operatingdir|preserve|quotestr|regexp|smooth|speller|suspend|tabsize|tempfile|historylog|view)"
color brightwhite "^ *syntax [^ ]*"
color brightblue "^ *set\>" "^ *unset\>" "^ *syntax\>"
color white "^ *color\>.*"
color yellow "^ *color (bright)?(black|blue|cyan|green|magenta|red|white|yellow)\>"
color magenta "^ *color\>"
color green "^#.*$"
# grub.conf/cfg syntax highlighting
###############################
syntax "grub.conf/cfg" "grub\.conf|cfg"
color cyan "(^default.+|^timeout.+)"
color red "^title.+"
color yellow "(initrd.+|kernel.+|root.+)"
color green "^#.*"

View File

@ -1,6 +1,11 @@
# Vim keys # Vim keys
bind s split-window -v
bind v split-window -h # dirty hack for old tmux which doesn't support -c option
# save current path for >=tmux-1.9a
bind c new-window -c "#{pane_current_path}"
bind s split-window -v -c "#{pane_current_path}"
bind v split-window -h -c "#{pane_current_path}"
bind h select-pane -L bind h select-pane -L
bind j select-pane -D bind j select-pane -D
bind k select-pane -U bind k select-pane -U
@ -10,21 +15,24 @@ bind > resize-pane -R 10
bind - resize-pane -D 10 bind - resize-pane -D 10
bind + resize-pane -U 10 bind + resize-pane -U 10
bind : command-prompt bind : command-prompt
bind R respawn-window
bind y swap-window -t -1\; select-window -t -1
bind u swap-window -t +1\; select-window -t +1
# vi-style controls for copy mode # vi-style controls for copy mode
setw -g mode-keys vi setw -g mode-keys vi
set -g default-terminal "screen-256color" set -g default-terminal "screen-256color"
bind-key R respawn-window
# create a session with a throw-away window # create a session with a throw-away window
new true # new true
# #
# # for future windows, stay open after the command exits # # for future windows, stay open after the command exits
#set set-remain-on-exit on #set set-remain-on-exit on
# #
# # create the windows we really want # # create the windows we really want
neww -n vim # neww -n vim
splitw -v -p 20 -t 0 # splitw -v -p 20 -t 0
# #
# # for future windows, revert r-o-e to global value # # for future windows, revert r-o-e to global value
#set -u set-remain-on-exit #set -u set-remain-on-exit
@ -33,3 +41,5 @@ splitw -v -p 20 -t 0
#selectw -t 1 #selectw -t 1
#selectp -t 0 #selectp -t 0
set-window-option -g xterm-keys on
set-option -g history-limit 32768

200
.vim/after/syntax/vala.vim Normal file
View File

@ -0,0 +1,200 @@
" Vim syntax file
" Language: Vala
" Maintainers: Emmanuele Bassi <ebassi@gnome.org>
" Hans Vercammen <hveso3@gmail.com>
" pancake <pancake@nopcode.org>
" Sebastian Reichel <sre@ring0.de>
" Last Change: 2012-02-19
" Filenames: *.vala *.vapi
"
" REFERENCES:
" [1] http://live.gnome.org/Vala
"
" TODO: Possibly when reaching vala 1.0 release
" - validate code attributes
" - better error checking for known errors
" - full support for valadoc
"
" add vala in /usr/share/vim/vim73/scripts.vim below ruby
" to have shebang support
if exists("b:current_syntax")
finish
endif
let s:vala_cpo_save = &cpo
set cpo&vim
" Types
syn keyword valaType bool char double float size_t ssize_t string unichar void
syn keyword valaType int int8 int16 int32 int64 long short
syn keyword valaType uint uint8 uint16 uint32 uint64 ulong ushort
" Storage keywords
syn keyword valaStorage class delegate enum errordomain interface namespace struct
" repeat / condition / label
syn keyword valaRepeat break continue do for foreach return while
syn keyword valaConditional else if switch assert
" User Labels
syn keyword valaLabel case default
" Modifiers
syn keyword valaModifier abstract const dynamic ensures extern inline internal override
syn keyword valaModifier private protected public requires signal static virtual volatile weak
syn keyword valaModifier async owned unowned
" Constants
syn keyword valaConstant false null true
" Exceptions
syn keyword valaException try catch finally throw
" Unspecified Statements
syn keyword valaUnspecifiedStatement as base construct delete get in is lock new out params ref sizeof set this throws typeof using value var yield
" Comments
syn cluster valaCommentGroup contains=valaTodo
syn keyword valaTodo contained TODO FIXME XXX NOTE
" valadoc Comments (ported from javadoc comments in java.vim)
" TODO: need to verify valadoc syntax
if !exists("vala_ignore_valadoc")
syn cluster valaDocCommentGroup contains=valaDocTags,valaDocSeeTag
syn region valaDocTags contained start="{@\(link\|linkplain\|inherit[Dd]oc\|doc[rR]oot\|value\)" end="}"
syn match valaDocTags contained "@\(param\|exception\|throws\|since\)\s\+\S\+" contains=valaDocParam
syn match valaDocParam contained "\s\S\+"
syn match valaDocTags contained "@\(author\|brief\|version\|return\|deprecated\)\>"
syn region valaDocSeeTag contained matchgroup=valaDocTags start="@see\s\+" matchgroup=NONE end="\_."re=e-1 contains=valaDocSeeTagParam
syn match valaDocSeeTagParam contained @"\_[^"]\+"\|<a\s\+\_.\{-}</a>\|\(\k\|\.\)*\(#\k\+\((\_[^)]\+)\)\=\)\=@ extend
endif
" Comment Strings (ported from c.vim)
if exists("vala_comment_strings")
syn match valaCommentSkip contained "^\s*\*\($\|\s\+\)"
syn region valaCommentString contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=valaSpecialChar,valaCommentSkip
syn region valaComment2String contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=valaSpecialChar
syn cluster valaCommentStringGroup contains=valaCommentString,valaCharacter,valaNumber
syn region valaCommentL start="//" end="$" keepend contains=@valaCommentGroup,valaComment2String,valaCharacter,valaNumber,valaSpaceError,@Spell
syn region valaComment matchgroup=valaCommentStart start="/\*" end="\*/" contains=@valaCommentGroup,@valaCommentStringGroup,valaCommentStartError,valaSpaceError,@Spell extend fold
if !exists("vala_ignore_valadoc")
syn region valaDocComment matchgroup=valaCommentStart start="/\*\*" end="\*/" keepend contains=@valaCommentGroup,@valaDocCommentGroup,@valaCommentStringGroup,valaCommentStartError,valaSpaceError,@Spell
endif
else
syn region valaCommentL start="//" end="$" keepend contains=@valaCommentGroup,valaSpaceError,@Spell
syn region valaComment matchgroup=valaCommentStart start="/\*" end="\*/" contains=@valaCommentGroup,valaCommentStartError,valaSpaceError,@Spell
if !exists("vala_ignore_valadoc")
syn region valaDocComment matchgroup=valaCommentStart start="/\*\*" end="\*/" keepend contains=@valaCommentGroup,@valaDocCommentGroup,valaCommentStartError,valaSpaceError,@Spell
endif
endif
syn region valaPreCondit start="^\s*\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" end="//"me=s-1
syn match valaPreCondit display "^\s*\(%:\|#\)\s*\(else\|endif\)\>"
" Comment if 0 blocks (ported from c.vim)
if !exists("vala_no_if0")
syn region valaCppOut start="^\s*\(%:\|#\)\s*if\s\+0\+\>" end=".\@=\|$" contains=valaCppOut2 fold
syn region valaCppOut2 contained start="0" end="^\s*\(%:\|#\)\s*\(endif\>\|else\>\|elif\>\)" contains=valaSpaceError,valaCppSkip
syn region valaCppSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=valaSpaceError,valaCppSkip
endif
" match comment errors
syntax match valaCommentError display "\*/"
syntax match valaCommentStartError display "/\*"me=e-1 contained
" match the special comment /**/
syn match valaComment "/\*\*/"
" Vala Code Attributes
syn region valaAttribute start="^\s*\[" end="\]$" contains=valaComment,valaString keepend
syn region valaAttribute start="\[CCode" end="\]" contains=valaComment,valaString
" Avoid escaped keyword matching
syn match valaUserContent display "@\I*"
" Strings and constants
syn match valaSpecialError contained "\\."
syn match valaSpecialCharError contained "[^']"
syn match valaSpecialChar contained +\\["\\'0abfnrtvx]+
syn region valaString start=+"+ end=+"+ end=+$+ contains=valaSpecialChar,valaSpecialError,valaUnicodeNumber,@Spell
syn region valaVerbatimString start=+"""+ end=+"""+ contains=@Spell
syn match valaUnicodeNumber +\\\(u\x\{4}\|U\x\{8}\)+ contained contains=valaUnicodeSpecifier
syn match valaUnicodeSpecifier +\\[uU]+ contained
syn match valaCharacter "'[^']*'" contains=valaSpecialChar,valaSpecialCharError
syn match valaCharacter "'\\''" contains=valaSpecialChar
syn match valaCharacter "'[^\\]'"
syn match valaNumber display "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>"
syn match valaNumber display "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\="
syn match valaNumber display "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>"
syn match valaNumber display "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>"
" when wanted, highlight trailing white space
if exists("vala_space_errors")
if !exists("vala_no_trail_space_error")
syn match valaSpaceError display excludenl "\s\+$"
endif
if !exists("vala_no_tab_space_error")
syn match valaSpaceError display " \+\t"me=e-1
endif
endif
" when wanted, set minimum lines for comment syntax syncing
if exists("vala_minlines")
let b:vala_minlines = vala_minlines
else
let b:vala_minlines = 50
endif
exec "syn sync ccomment valaComment minlines=" . b:vala_minlines
" code folding
syn region valaBlock start="{" end="}" transparent fold
" The default highlighting.
hi def link valaType Type
hi def link valaStorage StorageClass
hi def link valaRepeat Repeat
hi def link valaConditional Conditional
hi def link valaLabel Label
hi def link valaModifier StorageClass
hi def link valaConstant Constant
hi def link valaException Exception
hi def link valaUnspecifiedStatement Statement
hi def link valaUnspecifiedKeyword Keyword
hi def link valaContextualStatement Statement
hi def link valaCommentError Error
hi def link valaCommentStartError Error
hi def link valaSpecialError Error
hi def link valaSpecialCharError Error
hi def link valaSpaceError Error
hi def link valaTodo Todo
hi def link valaCommentL valaComment
hi def link valaCommentStart valaComment
hi def link valaCommentSkip valaComment
hi def link valaComment Comment
hi def link valaDocComment Comment
hi def link valaDocTags Special
hi def link valaDocParam Function
hi def link valaDocSeeTagParam Function
hi def link valaAttribute PreCondit
hi def link valaCommentString valaString
hi def link valaComment2String valaString
hi def link valaString String
hi def link valaVerbatimString String
hi def link valaCharacter Character
hi def link valaSpecialChar SpecialChar
hi def link valaNumber Number
hi def link valaUnicodeNumber SpecialChar
hi def link valaUnicodeSpecifier SpecialChar
hi def link valaPreCondit PreCondit
if !exists("vala_no_if0")
hi def link valaCppSkip valaCppOut
hi def link valaCppOut2 valaCppOut
hi def link valaCppOut Comment
endif
let b:current_syntax = "vala"
let &cpo = s:vala_cpo_save
unlet s:vala_cpo_save
" vim: ts=8

1046
.vim/autoload/fuf.vim Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,163 @@
"=============================================================================
" Copyright (c) 2010 Takeshi NISHIDA
"
"=============================================================================
" LOAD GUARD {{{1
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
" }}}1
"=============================================================================
" GLOBAL FUNCTIONS {{{1
"
function fuf#bookmarkdir#createHandler(base)
return a:base.concretize(copy(s:handler))
endfunction
"
function fuf#bookmarkdir#getSwitchOrder()
return g:fuf_bookmarkdir_switchOrder
endfunction
"
function fuf#bookmarkdir#getEditableDataNames()
return ['items']
endfunction
"
function fuf#bookmarkdir#renewCache()
endfunction
"
function fuf#bookmarkdir#requiresOnCommandPre()
return 0
endfunction
"
function fuf#bookmarkdir#onInit()
call fuf#defineLaunchCommand('FufBookmarkDir', s:MODE_NAME, '""', [])
command! -bang -narg=? FufBookmarkDirAdd call s:bookmark(<q-args>)
endfunction
" }}}1
"=============================================================================
" LOCAL FUNCTIONS/VARIABLES {{{1
let s:MODE_NAME = expand('<sfile>:t:r')
let s:OPEN_TYPE_DELETE = -1
"
function s:bookmark(word)
let item = {
\ 'time' : localtime(),
\ }
let item.path = l9#inputHl('Question', '[fuf] Directory to bookmark:',
\ fnamemodify(getcwd(), ':p:~'), 'dir')
if item.path !~ '\S'
call fuf#echoWarning('Canceled')
return
endif
let item.word = l9#inputHl('Question', '[fuf] Bookmark as:',
\ fnamemodify(getcwd(), ':p:~'))
if item.word !~ '\S'
call fuf#echoWarning('Canceled')
return
endif
let items = fuf#loadDataFile(s:MODE_NAME, 'items')
call insert(items, item)
call fuf#saveDataFile(s:MODE_NAME, 'items', items)
endfunction
"
function s:findItem(items, word)
for item in a:items
if item.word ==# a:word
return item
endif
endfor
return {}
endfunction
" }}}1
"=============================================================================
" s:handler {{{1
let s:handler = {}
"
function s:handler.getModeName()
return s:MODE_NAME
endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(g:fuf_bookmarkdir_prompt, self.partialMatching, '')
endfunction
"
function s:handler.getPreviewHeight()
return 0
endfunction
"
function s:handler.isOpenable(enteredPattern)
return 1
endfunction
"
function s:handler.makePatternSet(patternBase)
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath',
\ self.partialMatching)
endfunction
"
function s:handler.makePreviewLines(word, count)
return []
endfunction
"
function s:handler.getCompleteItems(patternPrimary)
return self.items
endfunction
"
function s:handler.onOpen(word, mode)
if a:mode ==# s:OPEN_TYPE_DELETE
let items = fuf#loadDataFile(s:MODE_NAME, 'items')
call filter(items, 'v:val.word !=# a:word')
call fuf#saveDataFile(s:MODE_NAME, 'items', items)
let self.reservedMode = self.getModeName()
return
else
let item = s:findItem(fuf#loadDataFile(s:MODE_NAME, 'items'), a:word)
if !empty(item)
execute ':cd ' . fnameescape(item.path)
endif
endif
endfunction
"
function s:handler.onModeEnterPre()
endfunction
"
function s:handler.onModeEnterPost()
call fuf#defineKeyMappingInHandler(g:fuf_bookmarkdir_keyDelete,
\ 'onCr(' . s:OPEN_TYPE_DELETE . ')')
let self.items = fuf#loadDataFile(s:MODE_NAME, 'items')
call map(self.items, 'fuf#makeNonPathItem(v:val.word, strftime(g:fuf_timeFormat, v:val.time))')
call fuf#mapToSetSerialIndex(self.items, 1)
call map(self.items, 'fuf#setAbbrWithFormattedWord(v:val, 1)')
endfunction
"
function s:handler.onModeLeavePost(opened)
endfunction
" }}}1
"=============================================================================
" vim: set fdm=marker:

View File

@ -0,0 +1,199 @@
"=============================================================================
" Copyright (c) 2010 Takeshi NISHIDA
"
"=============================================================================
" LOAD GUARD {{{1
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
" }}}1
"=============================================================================
" GLOBAL FUNCTIONS {{{1
"
function fuf#bookmarkfile#createHandler(base)
return a:base.concretize(copy(s:handler))
endfunction
"
function fuf#bookmarkfile#getSwitchOrder()
return g:fuf_bookmarkfile_switchOrder
endfunction
"
function fuf#bookmarkfile#getEditableDataNames()
return ['items']
endfunction
"
function fuf#bookmarkfile#renewCache()
endfunction
"
function fuf#bookmarkfile#requiresOnCommandPre()
return 0
endfunction
"
function fuf#bookmarkfile#onInit()
call fuf#defineLaunchCommand('FufBookmarkFile', s:MODE_NAME, '""', [])
command! -bang -narg=? FufBookmarkFileAdd call s:bookmarkHere(<q-args>)
command! -bang -narg=0 -range FufBookmarkFileAddAsSelectedText call s:bookmarkHere(l9#getSelectedText())
endfunction
" }}}1
"=============================================================================
" LOCAL FUNCTIONS/VARIABLES {{{1
let s:MODE_NAME = expand('<sfile>:t:r')
let s:OPEN_TYPE_DELETE = -1
" opens a:path and jumps to the line matching to a:pattern from a:lnum within
" a:range. if not found, jumps to a:lnum.
function s:jumpToBookmark(path, mode, pattern, lnum)
call fuf#openFile(a:path, a:mode, g:fuf_reuseWindow)
call cursor(s:getMatchingLineNumber(getline(1, '$'), a:pattern, a:lnum), 0)
normal! zvzz
endfunction
"
function s:getMatchingLineNumber(lines, pattern, lnumBegin)
let l = min([a:lnumBegin, len(a:lines)])
for [l0, l1] in map(range(0, g:fuf_bookmarkfile_searchRange),
\ '[l + v:val, l - v:val]')
if l0 <= len(a:lines) && a:lines[l0 - 1] =~# a:pattern
return l0
elseif l1 >= 0 && a:lines[l1 - 1] =~# a:pattern
return l1
endif
endfor
return l
endfunction
"
function s:getLinePattern(lnum)
return '\C\V\^' . escape(getline(a:lnum), '\') . '\$'
endfunction
"
function s:bookmarkHere(word)
if !empty(&buftype) || expand('%') !~ '\S'
call fuf#echoWarning('Can''t bookmark this buffer.')
return
endif
let item = {
\ 'word' : (a:word =~# '\S' ? substitute(a:word, '\n', ' ', 'g')
\ : pathshorten(expand('%:p:~')) . '|' . line('.') . '| ' . getline('.')),
\ 'path' : expand('%:p'),
\ 'lnum' : line('.'),
\ 'pattern' : s:getLinePattern(line('.')),
\ 'time' : localtime(),
\ }
let item.word = l9#inputHl('Question', '[fuf] Bookmark as:', item.word)
if item.word !~ '\S'
call fuf#echoWarning('Canceled')
return
endif
let items = fuf#loadDataFile(s:MODE_NAME, 'items')
call insert(items, item)
call fuf#saveDataFile(s:MODE_NAME, 'items', items)
endfunction
"
function s:findItem(items, word)
for item in a:items
if item.word ==# a:word
return item
endif
endfor
return {}
endfunction
" }}}1
"=============================================================================
" s:handler {{{1
let s:handler = {}
"
function s:handler.getModeName()
return s:MODE_NAME
endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(g:fuf_bookmarkfile_prompt, self.partialMatching, '')
endfunction
"
function s:handler.getPreviewHeight()
return g:fuf_previewHeight
endfunction
"
function s:handler.isOpenable(enteredPattern)
return 1
endfunction
"
function s:handler.makePatternSet(patternBase)
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath',
\ self.partialMatching)
endfunction
"
function s:handler.makePreviewLines(word, count)
let item = s:findItem(fuf#loadDataFile(s:MODE_NAME, 'items'), a:word)
let lines = fuf#getFileLines(item.path)
if empty(lines)
return []
endif
let index = s:getMatchingLineNumber(lines, item.pattern, item.lnum) - 1
return fuf#makePreviewLinesAround(
\ lines, [index], a:count, self.getPreviewHeight())
endfunction
"
function s:handler.getCompleteItems(patternPrimary)
return self.items
endfunction
"
function s:handler.onOpen(word, mode)
if a:mode ==# s:OPEN_TYPE_DELETE
let items = fuf#loadDataFile(s:MODE_NAME, 'items')
call filter(items, 'v:val.word !=# a:word')
call fuf#saveDataFile(s:MODE_NAME, 'items', items)
let self.reservedMode = self.getModeName()
return
else
let item = s:findItem(fuf#loadDataFile(s:MODE_NAME, 'items'), a:word)
if !empty(item)
call s:jumpToBookmark(item.path, a:mode, item.pattern, item.lnum)
endif
endif
endfunction
"
function s:handler.onModeEnterPre()
endfunction
"
function s:handler.onModeEnterPost()
call fuf#defineKeyMappingInHandler(g:fuf_bookmarkfile_keyDelete,
\ 'onCr(' . s:OPEN_TYPE_DELETE . ')')
let self.items = fuf#loadDataFile(s:MODE_NAME, 'items')
call map(self.items, 'fuf#makeNonPathItem(v:val.word, strftime(g:fuf_timeFormat, v:val.time))')
call fuf#mapToSetSerialIndex(self.items, 1)
call map(self.items, 'fuf#setAbbrWithFormattedWord(v:val, 1)')
endfunction
"
function s:handler.onModeLeavePost(opened)
endfunction
" }}}1
"=============================================================================
" vim: set fdm=marker:

View File

@ -0,0 +1,189 @@
"=============================================================================
" Copyright (c) 2007-2010 Takeshi NISHIDA
"
"=============================================================================
" LOAD GUARD {{{1
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
" }}}1
"=============================================================================
" GLOBAL FUNCTIONS {{{1
"
function fuf#buffer#createHandler(base)
return a:base.concretize(copy(s:handler))
endfunction
"
function fuf#buffer#getSwitchOrder()
return g:fuf_buffer_switchOrder
endfunction
"
function fuf#buffer#getEditableDataNames()
return []
endfunction
"
function fuf#buffer#renewCache()
endfunction
"
function fuf#buffer#requiresOnCommandPre()
return 0
endfunction
"
function fuf#buffer#onInit()
call fuf#defineLaunchCommand('FufBuffer', s:MODE_NAME, '""', [])
augroup fuf#buffer
autocmd!
autocmd BufEnter * call s:updateBufTimes()
autocmd BufWritePost * call s:updateBufTimes()
augroup END
endfunction
" }}}1
"=============================================================================
" LOCAL FUNCTIONS/VARIABLES {{{1
let s:MODE_NAME = expand('<sfile>:t:r')
let s:OPEN_TYPE_DELETE = -1
let s:bufTimes = {}
"
function s:updateBufTimes()
let s:bufTimes[bufnr('%')] = localtime()
endfunction
"
function s:makeItem(nr)
let fname = (empty(bufname(a:nr))
\ ? '[No Name]'
\ : fnamemodify(bufname(a:nr), ':p:~:.'))
let time = (exists('s:bufTimes[a:nr]') ? s:bufTimes[a:nr] : 0)
let item = fuf#makePathItem(fname, strftime(g:fuf_timeFormat, time), 0)
let item.index = a:nr
let item.bufNr = a:nr
let item.time = time
let item.abbrPrefix = s:getBufIndicator(a:nr) . ' '
return item
endfunction
"
function s:getBufIndicator(bufNr)
if !getbufvar(a:bufNr, '&modifiable')
return '[-]'
elseif getbufvar(a:bufNr, '&modified')
return '[+]'
elseif getbufvar(a:bufNr, '&readonly')
return '[R]'
else
return ' '
endif
endfunction
"
function s:compareTimeDescending(i1, i2)
return a:i1.time == a:i2.time ? 0 : a:i1.time > a:i2.time ? -1 : +1
endfunction
"
function s:findItem(items, word)
for item in a:items
if item.word ==# a:word
return item
endif
endfor
return {}
endfunction
" }}}1
"=============================================================================
" s:handler {{{1
let s:handler = {}
"
function s:handler.getModeName()
return s:MODE_NAME
endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(g:fuf_buffer_prompt, self.partialMatching, '')
endfunction
"
function s:handler.getPreviewHeight()
return g:fuf_previewHeight
endfunction
"
function s:handler.isOpenable(enteredPattern)
return 1
endfunction
"
function s:handler.makePatternSet(patternBase)
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForPath',
\ self.partialMatching)
endfunction
"
function s:handler.makePreviewLines(word, count)
let item = s:findItem(self.items, a:word)
if empty(item)
return []
endif
return fuf#makePreviewLinesForFile(item.bufNr, a:count, self.getPreviewHeight())
endfunction
"
function s:handler.getCompleteItems(patternPrimary)
return self.items
endfunction
"
function s:handler.onOpen(word, mode)
" not use bufnr(a:word) in order to handle unnamed buffer
let item = s:findItem(self.items, a:word)
if empty(item)
" do nothing
elseif a:mode ==# s:OPEN_TYPE_DELETE
execute item.bufNr . 'bdelete'
let self.reservedMode = self.getModeName()
else
call fuf#openBuffer(item.bufNr, a:mode, g:fuf_reuseWindow)
endif
endfunction
"
function s:handler.onModeEnterPre()
endfunction
"
function s:handler.onModeEnterPost()
call fuf#defineKeyMappingInHandler(g:fuf_buffer_keyDelete,
\ 'onCr(' . s:OPEN_TYPE_DELETE . ')')
let self.items = range(1, bufnr('$'))
call filter(self.items, 'buflisted(v:val) && v:val != self.bufNrPrev && v:val != bufnr("%")')
call map(self.items, 's:makeItem(v:val)')
if g:fuf_buffer_mruOrder
call sort(self.items, 's:compareTimeDescending')
call fuf#mapToSetSerialIndex(self.items, 1)
endif
let self.items = fuf#mapToSetAbbrWithSnippedWordAsPath(self.items)
endfunction
"
function s:handler.onModeLeavePost(opened)
endfunction
" }}}1
"=============================================================================
" vim: set fdm=marker:

View File

@ -0,0 +1,300 @@
"=============================================================================
" Copyright (c) 2010 Takeshi NISHIDA
"
"=============================================================================
" LOAD GUARD {{{1
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
" }}}1
"=============================================================================
" GLOBAL FUNCTIONS {{{1
"
function fuf#buffertag#createHandler(base)
return a:base.concretize(copy(s:handler))
endfunction
"
function fuf#buffertag#getSwitchOrder()
return g:fuf_buffertag_switchOrder
endfunction
"
function fuf#buffertag#getEditableDataNames()
return []
endfunction
"
function fuf#buffertag#renewCache()
let s:tagItemsCache = {}
let s:tagDataCache = {}
endfunction
"
function fuf#buffertag#requiresOnCommandPre()
return 0
endfunction
"
function fuf#buffertag#onInit()
call fuf#defineLaunchCommand('FufBufferTag', s:MODE_NAME, '""',
\ [['g:fuf_buffertag_forAll', 0]])
call fuf#defineLaunchCommand('FufBufferTagAll', s:MODE_NAME, '""',
\ [['g:fuf_buffertag_forAll', 1]])
call fuf#defineLaunchCommand('FufBufferTagWithCursorWord', s:MODE_NAME,
\ 'expand(''<cword>'')', [['g:fuf_buffertag_forAll', 0]])
call fuf#defineLaunchCommand('FufBufferTagAllWithCursorWord', s:MODE_NAME,
\ 'expand(''<cword>'')', [['g:fuf_buffertag_forAll', 1]])
call fuf#defineLaunchCommand('FufBufferTagWithSelectedText', s:MODE_NAME,
\ 'l9#getSelectedText()', [['g:fuf_buffertag_forAll', 0]])
call fuf#defineLaunchCommand('FufBufferTagAllWithSelectedText', s:MODE_NAME,
\ 'l9#getSelectedText()', [['g:fuf_buffertag_forAll', 1]])
call l9#defineVariableDefault('g:fuf_buffertag_forAll', 0) " private option
" the following settings originate from taglist.vim
call l9#defineVariableDefault('g:fuf_buffertag__asm' , '--language-force=asm --asm-types=dlmt')
call l9#defineVariableDefault('g:fuf_buffertag__aspperl' , '--language-force=asp --asp-types=fsv')
call l9#defineVariableDefault('g:fuf_buffertag__aspvbs' , '--language-force=asp --asp-types=fsv')
call l9#defineVariableDefault('g:fuf_buffertag__awk' , '--language-force=awk --awk-types=f')
call l9#defineVariableDefault('g:fuf_buffertag__beta' , '--language-force=beta --beta-types=fsv')
call l9#defineVariableDefault('g:fuf_buffertag__c' , '--language-force=c --c-types=dgsutvf')
call l9#defineVariableDefault('g:fuf_buffertag__cpp' , '--language-force=c++ --c++-types=nvdtcgsuf')
call l9#defineVariableDefault('g:fuf_buffertag__cs' , '--language-force=c# --c#-types=dtncEgsipm')
call l9#defineVariableDefault('g:fuf_buffertag__cobol' , '--language-force=cobol --cobol-types=dfgpPs')
call l9#defineVariableDefault('g:fuf_buffertag__eiffel' , '--language-force=eiffel --eiffel-types=cf')
call l9#defineVariableDefault('g:fuf_buffertag__erlang' , '--language-force=erlang --erlang-types=drmf')
call l9#defineVariableDefault('g:fuf_buffertag__expect' , '--language-force=tcl --tcl-types=cfp')
call l9#defineVariableDefault('g:fuf_buffertag__fortran' , '--language-force=fortran --fortran-types=pbceiklmntvfs')
call l9#defineVariableDefault('g:fuf_buffertag__html' , '--language-force=html --html-types=af')
call l9#defineVariableDefault('g:fuf_buffertag__java' , '--language-force=java --java-types=pcifm')
call l9#defineVariableDefault('g:fuf_buffertag__javascript', '--language-force=javascript --javascript-types=f')
call l9#defineVariableDefault('g:fuf_buffertag__lisp' , '--language-force=lisp --lisp-types=f')
call l9#defineVariableDefault('g:fuf_buffertag__lua' , '--language-force=lua --lua-types=f')
call l9#defineVariableDefault('g:fuf_buffertag__make' , '--language-force=make --make-types=m')
call l9#defineVariableDefault('g:fuf_buffertag__pascal' , '--language-force=pascal --pascal-types=fp')
call l9#defineVariableDefault('g:fuf_buffertag__perl' , '--language-force=perl --perl-types=clps')
call l9#defineVariableDefault('g:fuf_buffertag__php' , '--language-force=php --php-types=cdvf')
call l9#defineVariableDefault('g:fuf_buffertag__python' , '--language-force=python --python-types=cmf')
call l9#defineVariableDefault('g:fuf_buffertag__rexx' , '--language-force=rexx --rexx-types=s')
call l9#defineVariableDefault('g:fuf_buffertag__ruby' , '--language-force=ruby --ruby-types=cfFm')
call l9#defineVariableDefault('g:fuf_buffertag__scheme' , '--language-force=scheme --scheme-types=sf')
call l9#defineVariableDefault('g:fuf_buffertag__sh' , '--language-force=sh --sh-types=f')
call l9#defineVariableDefault('g:fuf_buffertag__csh' , '--language-force=sh --sh-types=f')
call l9#defineVariableDefault('g:fuf_buffertag__zsh' , '--language-force=sh --sh-types=f')
call l9#defineVariableDefault('g:fuf_buffertag__slang' , '--language-force=slang --slang-types=nf')
call l9#defineVariableDefault('g:fuf_buffertag__sml' , '--language-force=sml --sml-types=ecsrtvf')
call l9#defineVariableDefault('g:fuf_buffertag__sql' , '--language-force=sql --sql-types=cFPrstTvfp')
call l9#defineVariableDefault('g:fuf_buffertag__tcl' , '--language-force=tcl --tcl-types=cfmp')
call l9#defineVariableDefault('g:fuf_buffertag__vera' , '--language-force=vera --vera-types=cdefgmpPtTvx')
call l9#defineVariableDefault('g:fuf_buffertag__verilog' , '--language-force=verilog --verilog-types=mcPertwpvf')
call l9#defineVariableDefault('g:fuf_buffertag__vim' , '--language-force=vim --vim-types=avf')
call l9#defineVariableDefault('g:fuf_buffertag__yacc' , '--language-force=yacc --yacc-types=l')
endfunction
" }}}1
"=============================================================================
" LOCAL FUNCTIONS/VARIABLES {{{1
let s:MODE_NAME = expand('<sfile>:t:r')
"
function s:parseTagLine(line)
" tag W:\Win32\SRC7\NCSIM\NCVW32\CUBEFACE.H /^#define CUBEFACE_H$/;" macro line:4
let fields = matchlist(a:line, '\v^([^\t]+)\t(.+)\t\/\^(.+)\$\/\;\"\t(.+)\tline\:(\d+)')
if empty(fields)
return {}
endif
return {
\ 'tag' : fields[1],
\ 'fname' : fields[2],
\ 'pattern': fields[3],
\ 'kind' : fields[4],
\ 'lnum' : str2nr(fields[5]),
\ }
endfunction
"
let s:TEMP_VARIABLES_GROUP = expand('<sfile>:p')
"
function s:getFileType(bufNr)
let ft = getbufvar(a:bufNr, '&filetype')
if !empty(ft) || bufloaded(a:bufNr)
return ft
endif
let ft = getbufvar(a:bufNr, 'fuf_buffertag_filetype')
if !empty(ft)
return ft
endif
call l9#tempvariables#set(s:TEMP_VARIABLES_GROUP, '&eventignore', 'FileType')
call l9#tempvariables#set(s:TEMP_VARIABLES_GROUP, '&filetype', &filetype)
" from taglist.vim
execute 'doautocmd filetypedetect BufRead ' . bufname(a:bufNr)
let ft = &filetype
call l9#tempvariables#end(s:TEMP_VARIABLES_GROUP)
call setbufvar(a:bufNr, 'fuf_buffertag_filetype', ft)
return ft
endfunction
"
function s:makeCtagsCmd(bufNr)
let ft = s:getFileType(a:bufNr)
if !exists('g:fuf_buffertag__{ft}')
return ''
endif
"
let cmd = join([g:fuf_buffertag_ctagsPath,
\ '-f - --sort=no --excmd=pattern --fields=nKs',
\ g:fuf_buffertag__{ft},
\ shellescape(fnamemodify(bufname(a:bufNr), ':p'))])
return cmd
endfunction
"
function s:getTagItems(bufNr)
let cmd = s:makeCtagsCmd(a:bufNr)
if empty(cmd)
return []
elseif !exists('s:tagItemsCache[cmd]') ||
\ s:tagItemsCache[cmd].time < getftime(expand(bufname(a:bufNr)))
let items = split(system(cmd), "\n")
if v:shell_error
call fuf#echoError([cmd] + items)
throw "Command error"
endif
call map(items, 's:parseTagLine(v:val)')
call filter(items, '!empty(v:val)')
let s:tagItemsCache[cmd] = {
\ 'time' : localtime(),
\ 'items' : items,
\ }
endif
return s:tagItemsCache[cmd].items
endfunction
"
function s:makeItem(tag, itemMap)
let menu = fnamemodify(a:itemMap[a:tag][0].fname, ':t')
\ . ' [' . a:itemMap[a:tag][0].kind . ']'
if len(a:itemMap[a:tag]) > 1
let menu .= ' (' . len(a:itemMap[a:tag]) . ')'
endif
let item = fuf#makeNonPathItem(a:tag, menu)
return item
endfunction
"
function s:getTagData(bufNrs)
let key = join([0] + sort(copy(a:bufNrs)), "\n")
let bufNames = map(copy(a:bufNrs), 'bufname(v:val)')
if !exists('s:tagDataCache[key]') ||
\ fuf#countModifiedFiles(bufNames, s:tagDataCache[key].time) > 0
let itemMap = {}
for item in l9#concat(map(copy(a:bufNrs), 's:getTagItems(v:val)'))
if !exists('itemMap[item.tag]')
let itemMap[item.tag] = []
endif
call add(itemMap[item.tag], item)
endfor
let items = sort(keys(itemMap))
call map(items, 's:makeItem(v:val, itemMap)')
call fuf#mapToSetSerialIndex(items, 1)
call map(items, 'fuf#setAbbrWithFormattedWord(v:val, 1)')
let s:tagDataCache[key] = {
\ 'time' : localtime(),
\ 'itemMap': itemMap,
\ 'items' : items,
\ }
endif
return [s:tagDataCache[key].items, s:tagDataCache[key].itemMap]
endfunction
"
function s:jumpToTag(item, mode)
call fuf#openFile(a:item.fname, a:mode, g:fuf_reuseWindow)
call cursor(a:item.lnum, 1)
normal! zvzz
endfunction
" }}}1
"=============================================================================
" s:handler {{{1
let s:handler = {}
"
function s:handler.getModeName()
return s:MODE_NAME
endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(g:fuf_buffertag_prompt, self.partialMatching, '')
endfunction
"
function s:handler.getPreviewHeight()
return 0
endfunction
"
function s:handler.isOpenable(enteredPattern)
return 1
endfunction
"
function s:handler.makePatternSet(patternBase)
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath',
\ self.partialMatching)
endfunction
"
function s:handler.makePreviewLines(word, count)
return []
endfunction
"
function s:handler.getCompleteItems(patternPrimary)
return self.items
endfunction
"
function s:handler.onOpen(word, mode)
if !exists('self.itemMap[a:word][0]')
call fuf#echoError('Definition not found:' . a:word)
return
elseif len(self.itemMap[a:word]) == 1
let i = 0
else
let list = map(fuf#mapToSetSerialIndex(copy(self.itemMap[a:word]), 1),
\ 'printf(" %2d: %s|%d| [%s] %s",v:val.index, fnamemodify(v:val.fname, ":~:."), v:val.lnum, v:val.kind, v:val.pattern)')
let i = inputlist(['Select a definition of "' . a:word . '":'] + list) - 1
endif
if 0 <= i && i < len(self.itemMap[a:word])
call s:jumpToTag(self.itemMap[a:word][i], a:mode)
endif
endfunction
"
function s:handler.onModeEnterPre()
endfunction
"
function s:handler.onModeEnterPost()
if g:fuf_buffertag_forAll
let bufNrs = filter(range(1, bufnr('$')), 'buflisted(v:val)')
else
let bufNrs = [self.bufNrPrev]
endif
let [self.items, self.itemMap] = s:getTagData(bufNrs)
endfunction
"
function s:handler.onModeLeavePost(opened)
endfunction
" }}}1
"=============================================================================
" vim: set fdm=marker:

View File

@ -0,0 +1,137 @@
"=============================================================================
" Copyright (c) 2007-2010 Takeshi NISHIDA
"
"=============================================================================
" LOAD GUARD {{{1
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
" }}}1
"=============================================================================
" GLOBAL FUNCTIONS {{{1
"
function fuf#callbackfile#createHandler(base)
return a:base.concretize(copy(s:handler))
endfunction
"
function fuf#callbackfile#getSwitchOrder()
return -1
endfunction
"
function fuf#callbackfile#getEditableDataNames()
return []
endfunction
"
function fuf#callbackfile#renewCache()
let s:cache = {}
endfunction
"
function fuf#callbackfile#requiresOnCommandPre()
return 0
endfunction
"
function fuf#callbackfile#onInit()
endfunction
"
function fuf#callbackfile#launch(initialPattern, partialMatching, prompt, exclude, listener)
let s:prompt = (empty(a:prompt) ? '>' : a:prompt)
let s:exclude = a:exclude
let s:listener = a:listener
call fuf#launch(s:MODE_NAME, a:initialPattern, a:partialMatching)
endfunction
" }}}1
"=============================================================================
" LOCAL FUNCTIONS/VARIABLES {{{1
let s:MODE_NAME = expand('<sfile>:t:r')
"
function s:enumItems(dir)
let key = getcwd() . g:fuf_ignoreCase . s:exclude . "\n" . a:dir
if !exists('s:cache[key]')
let s:cache[key] = fuf#enumExpandedDirsEntries(a:dir, s:exclude)
if isdirectory(a:dir)
call insert(s:cache[key], fuf#makePathItem(a:dir . '.', '', 0))
endif
call fuf#mapToSetSerialIndex(s:cache[key], 1)
call fuf#mapToSetAbbrWithSnippedWordAsPath(s:cache[key])
endif
return s:cache[key]
endfunction
" }}}1
"=============================================================================
" s:handler {{{1
let s:handler = {}
"
function s:handler.getModeName()
return s:MODE_NAME
endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(s:prompt, self.partialMatching, '')
endfunction
"
function s:handler.getPreviewHeight()
return g:fuf_previewHeight
endfunction
"
function s:handler.isOpenable(enteredPattern)
return a:enteredPattern =~# '[^/\\]$'
endfunction
"
function s:handler.makePatternSet(patternBase)
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForPathTail',
\ self.partialMatching)
endfunction
"
function s:handler.makePreviewLines(word, count)
return fuf#makePreviewLinesForFile(a:word, a:count, self.getPreviewHeight())
endfunction
"
function s:handler.getCompleteItems(patternPrimary)
let items = copy(s:enumItems(fuf#splitPath(a:patternPrimary).head))
return filter(items, 'bufnr("^" . v:val.word . "$") != self.bufNrPrev')
endfunction
"
function s:handler.onOpen(word, mode)
call s:listener.onComplete(a:word, a:mode)
endfunction
"
function s:handler.onModeEnterPre()
endfunction
"
function s:handler.onModeEnterPost()
endfunction
"
function s:handler.onModeLeavePost(opened)
if !a:opened && exists('s:listener.onAbort()')
call s:listener.onAbort()
endif
endfunction
" }}}1
"=============================================================================
" vim: set fdm=marker:

View File

@ -0,0 +1,139 @@
"=============================================================================
" Copyright (c) 2007-2010 Takeshi NISHIDA
"
"=============================================================================
" LOAD GUARD {{{1
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
" }}}1
"=============================================================================
" GLOBAL FUNCTIONS {{{1
"
function fuf#callbackitem#createHandler(base)
return a:base.concretize(copy(s:handler))
endfunction
"
function fuf#callbackitem#getSwitchOrder()
return -1
endfunction
"
function fuf#callbackitem#getEditableDataNames()
return []
endfunction
"
function fuf#callbackitem#renewCache()
endfunction
"
function fuf#callbackitem#requiresOnCommandPre()
return 0
endfunction
"
function fuf#callbackitem#onInit()
endfunction
"
function fuf#callbackitem#launch(initialPattern, partialMatching, prompt, listener, items, forPath)
let s:prompt = (empty(a:prompt) ? '>' : a:prompt)
let s:listener = a:listener
let s:forPath = a:forPath
let s:items = copy(a:items)
if s:forPath
call map(s:items, 'fuf#makePathItem(v:val, "", 1)')
call fuf#mapToSetSerialIndex(s:items, 1)
call fuf#mapToSetAbbrWithSnippedWordAsPath(s:items)
else
call map(s:items, 'fuf#makeNonPathItem(v:val, "")')
call fuf#mapToSetSerialIndex(s:items, 1)
call map(s:items, 'fuf#setAbbrWithFormattedWord(v:val, 1)')
endif
call fuf#launch(s:MODE_NAME, a:initialPattern, a:partialMatching)
endfunction
" }}}1
"=============================================================================
" LOCAL FUNCTIONS/VARIABLES {{{1
let s:MODE_NAME = expand('<sfile>:t:r')
" }}}1
"=============================================================================
" s:handler {{{1
let s:handler = {}
"
function s:handler.getModeName()
return s:MODE_NAME
endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(s:prompt, self.partialMatching, '')
endfunction
"
function s:handler.getPreviewHeight()
if s:forPath
return g:fuf_previewHeight
endif
return 0
endfunction
"
function s:handler.isOpenable(enteredPattern)
return 1
endfunction
"
function s:handler.makePatternSet(patternBase)
let parser = (s:forPath
\ ? 's:interpretPrimaryPatternForPath'
\ : 's:interpretPrimaryPatternForNonPath')
return fuf#makePatternSet(a:patternBase, parser, self.partialMatching)
endfunction
"
function s:handler.makePreviewLines(word, count)
if s:forPath
return fuf#makePreviewLinesForFile(a:word, a:count, self.getPreviewHeight())
endif
return []
endfunction
"
function s:handler.getCompleteItems(patternPrimary)
return s:items
endfunction
"
function s:handler.onOpen(word, mode)
call s:listener.onComplete(a:word, a:mode)
endfunction
"
function s:handler.onModeEnterPre()
endfunction
"
function s:handler.onModeEnterPost()
endfunction
"
function s:handler.onModeLeavePost(opened)
if !a:opened && exists('s:listener.onAbort()')
call s:listener.onAbort()
endif
endfunction
" }}}1
"=============================================================================
" vim: set fdm=marker:

View File

@ -0,0 +1,172 @@
"=============================================================================
" Copyright (c) 2007-2010 Takeshi NISHIDA
"
"=============================================================================
" LOAD GUARD {{{1
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
" }}}1
"=============================================================================
" GLOBAL FUNCTIONS {{{1
"
function fuf#changelist#createHandler(base)
return a:base.concretize(copy(s:handler))
endfunction
"
function fuf#changelist#getSwitchOrder()
return g:fuf_changelist_switchOrder
endfunction
"
function fuf#changelist#getEditableDataNames()
return []
endfunction
"
function fuf#changelist#renewCache()
endfunction
"
function fuf#changelist#requiresOnCommandPre()
return 0
endfunction
"
function fuf#changelist#onInit()
call fuf#defineLaunchCommand('FufChangeList', s:MODE_NAME, '""', [])
endfunction
" }}}1
"=============================================================================
" LOCAL FUNCTIONS/VARIABLES {{{1
let s:MODE_NAME = expand('<sfile>:t:r')
"
function s:getChangesLines()
redir => result
:silent changes
redir END
return split(result, "\n")
endfunction
"
function s:parseChangesLine(line)
" return matchlist(a:line, '^\(.\)\s\+\(\d\+\)\s\(.*\)$')
let elements = matchlist(a:line, '\v^(.)\s*(\d+)\s+(\d+)\s+(\d+)\s*(.*)$')
if empty(elements)
return {}
endif
return {
\ 'prefix': elements[1],
\ 'count' : elements[2],
\ 'lnum' : elements[3],
\ 'text' : printf('|%d:%d|%s', elements[3], elements[4], elements[5]),
\ }
endfunction
"
function s:makeItem(line)
let parsed = s:parseChangesLine(a:line)
if empty(parsed)
return {}
endif
let item = fuf#makeNonPathItem(parsed.text, '')
let item.abbrPrefix = parsed.prefix
let item.lnum = parsed.lnum
return item
endfunction
" }}}1
"=============================================================================
" s:handler {{{1
let s:handler = {}
"
function s:handler.getModeName()
return s:MODE_NAME
endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(g:fuf_changelist_prompt, self.partialMatching, '')
endfunction
"
function s:handler.getPreviewHeight()
return g:fuf_previewHeight
endfunction
"
function s:handler.isOpenable(enteredPattern)
return 1
endfunction
"
function s:handler.makePatternSet(patternBase)
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath',
\ self.partialMatching)
endfunction
"
function s:handler.makePreviewLines(word, count)
let items = filter(copy(self.items), 'v:val.word ==# a:word')
if empty(items)
return []
endif
let lines = fuf#getFileLines(self.bufNrPrev)
return fuf#makePreviewLinesAround(
\ lines, [items[0].lnum - 1], a:count, self.getPreviewHeight())
endfunction
"
function s:handler.getCompleteItems(patternPrimary)
return self.items
endfunction
"
function s:handler.onOpen(word, mode)
call fuf#prejump(a:mode)
let older = 0
for line in reverse(s:getChangesLines())
if stridx(line, '>') == 0
let older = 1
endif
let parsed = s:parseChangesLine(line)
if !empty(parsed) && parsed.text ==# a:word
if parsed.count != 0
execute 'normal! ' . parsed.count . (older ? 'g;' : 'g,') . 'zvzz'
endif
break
endif
endfor
endfunction
"
function s:handler.onModeEnterPre()
let self.items = s:getChangesLines()
endfunction
"
function s:handler.onModeEnterPost()
call map(self.items, 's:makeItem(v:val)')
call filter(self.items, '!empty(v:val)')
call reverse(self.items)
call fuf#mapToSetSerialIndex(self.items, 1)
call map(self.items, 'fuf#setAbbrWithFormattedWord(v:val, 1)')
endfunction
"
function s:handler.onModeLeavePost(opened)
endfunction
" }}}1
"=============================================================================
" vim: set fdm=marker:

View File

@ -0,0 +1,199 @@
"=============================================================================
" Copyright (c) 2007-2010 Takeshi NISHIDA
"
"=============================================================================
" LOAD GUARD {{{1
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
" }}}1
"=============================================================================
" GLOBAL FUNCTIONS {{{1
"
function fuf#coveragefile#createHandler(base)
return a:base.concretize(copy(s:handler))
endfunction
"
function fuf#coveragefile#getSwitchOrder()
return g:fuf_coveragefile_switchOrder
endfunction
"
function fuf#coveragefile#getEditableDataNames()
return ['coverages']
endfunction
"
function fuf#coveragefile#renewCache()
let s:cache = {}
endfunction
"
function fuf#coveragefile#requiresOnCommandPre()
return 0
endfunction
"
function fuf#coveragefile#onInit()
call fuf#defineLaunchCommand('FufCoverageFile', s:MODE_NAME, '""', [])
call l9#defineVariableDefault('g:fuf_coveragefile_name', '') " private option
command! -bang -narg=0 FufCoverageFileRegister call s:registerCoverage()
command! -bang -narg=? FufCoverageFileChange call s:changeCoverage(<q-args>)
endfunction
" }}}1
"=============================================================================
" LOCAL FUNCTIONS/VARIABLES {{{1
let s:MODE_NAME = expand('<sfile>:t:r')
"
function s:enumItems()
let key = join([getcwd(), g:fuf_ignoreCase, g:fuf_coveragefile_exclude,
\ g:fuf_coveragefile_globPatterns], "\n")
if !exists('s:cache[key]')
let s:cache[key] = l9#concat(map(copy(g:fuf_coveragefile_globPatterns),
\ 'fuf#glob(v:val)'))
call filter(s:cache[key], 'filereadable(v:val)') " filter out directories
call map(s:cache[key], 'fuf#makePathItem(fnamemodify(v:val, ":~:."), "", 0)')
if len(g:fuf_coveragefile_exclude)
call filter(s:cache[key], 'v:val.word !~ g:fuf_coveragefile_exclude')
endif
call fuf#mapToSetSerialIndex(s:cache[key], 1)
call fuf#mapToSetAbbrWithSnippedWordAsPath(s:cache[key])
endif
return s:cache[key]
endfunction
"
function s:registerCoverage()
let patterns = []
while 1
let pattern = l9#inputHl('Question', '[fuf] Glob pattern for coverage (<Esc> and end):',
\ '', 'file')
if pattern !~ '\S'
break
endif
call add(patterns, pattern)
endwhile
if empty(patterns)
call fuf#echoWarning('Canceled')
return
endif
echo '[fuf] patterns: ' . string(patterns)
let name = l9#inputHl('Question', '[fuf] Coverage name:')
if name !~ '\S'
call fuf#echoWarning('Canceled')
return
endif
let coverages = fuf#loadDataFile(s:MODE_NAME, 'coverages')
call insert(coverages, {'name': name, 'patterns': patterns})
call fuf#saveDataFile(s:MODE_NAME, 'coverages', coverages)
endfunction
"
function s:createChangeCoverageListener()
let listener = {}
function listener.onComplete(name, method)
call s:changeCoverage(a:name)
endfunction
return listener
endfunction
"
function s:changeCoverage(name)
let coverages = fuf#loadDataFile(s:MODE_NAME, 'coverages')
if a:name !~ '\S'
let names = map(copy(coverages), 'v:val.name')
call fuf#callbackitem#launch('', 0, '>Coverage>', s:createChangeCoverageListener(), names, 0)
return
else
let name = a:name
endif
call filter(coverages, 'v:val.name ==# name')
if empty(coverages)
call fuf#echoError('Coverage not found: ' . name)
return
endif
call fuf#setOneTimeVariables(
\ ['g:fuf_coveragefile_globPatterns', coverages[0].patterns],
\ ['g:fuf_coveragefile_name' , a:name]
\ )
FufCoverageFile
endfunction
" }}}1
"=============================================================================
" s:handler {{{1
let s:handler = {}
"
function s:handler.getModeName()
return s:MODE_NAME
endfunction
"
function s:handler.getPrompt()
let nameString = (empty(g:fuf_coveragefile_name) ? ''
\ : '[' . g:fuf_coveragefile_name . ']')
return fuf#formatPrompt(g:fuf_coveragefile_prompt, self.partialMatching,
\ nameString)
endfunction
"
function s:handler.getPreviewHeight()
return g:fuf_previewHeight
endfunction
"
function s:handler.isOpenable(enteredPattern)
return 1
endfunction
"
function s:handler.makePatternSet(patternBase)
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForPath',
\ self.partialMatching)
endfunction
"
function s:handler.makePreviewLines(word, count)
return fuf#makePreviewLinesForFile(a:word, a:count, self.getPreviewHeight())
endfunction
"
function s:handler.getCompleteItems(patternPrimary)
return self.items
endfunction
"
function s:handler.onOpen(word, mode)
call fuf#openFile(a:word, a:mode, g:fuf_reuseWindow)
endfunction
"
function s:handler.onModeEnterPre()
endfunction
"
function s:handler.onModeEnterPost()
" NOTE: Comparing filenames is faster than bufnr('^' . fname . '$')
let bufNamePrev = fnamemodify(bufname(self.bufNrPrev), ':~:.')
let self.items = copy(s:enumItems())
call filter(self.items, 'v:val.word !=# bufNamePrev')
endfunction
"
function s:handler.onModeLeavePost(opened)
endfunction
" }}}1
"=============================================================================
" vim: set fdm=marker:

132
.vim/autoload/fuf/dir.vim Normal file
View File

@ -0,0 +1,132 @@
"=============================================================================
" Copyright (c) 2007-2010 Takeshi NISHIDA
"
"=============================================================================
" LOAD GUARD {{{1
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
" }}}1
"=============================================================================
" GLOBAL FUNCTIONS {{{1
"
function fuf#dir#createHandler(base)
return a:base.concretize(copy(s:handler))
endfunction
"
function fuf#dir#getSwitchOrder()
return g:fuf_dir_switchOrder
endfunction
"
function fuf#dir#getEditableDataNames()
return []
endfunction
"
function fuf#dir#renewCache()
let s:cache = {}
endfunction
"
function fuf#dir#requiresOnCommandPre()
return 0
endfunction
"
function fuf#dir#onInit()
call fuf#defineLaunchCommand('FufDir' , s:MODE_NAME, '""', [])
call fuf#defineLaunchCommand('FufDirWithFullCwd' , s:MODE_NAME, 'fnamemodify(getcwd(), '':p'')', [])
call fuf#defineLaunchCommand('FufDirWithCurrentBufferDir', s:MODE_NAME, 'expand(''%:~:.'')[:-1-len(expand(''%:~:.:t''))]', [])
endfunction
" }}}1
"=============================================================================
" LOCAL FUNCTIONS/VARIABLES {{{1
let s:MODE_NAME = expand('<sfile>:t:r')
"
function s:enumItems(dir)
let key = getcwd() . g:fuf_ignoreCase . g:fuf_dir_exclude . "\n" . a:dir
if !exists('s:cache[key]')
let s:cache[key] = fuf#enumExpandedDirsEntries(a:dir, g:fuf_dir_exclude)
call filter(s:cache[key], 'v:val.word =~# ''[/\\]$''')
if isdirectory(a:dir)
call insert(s:cache[key], fuf#makePathItem(a:dir . '.', '', 0))
endif
call fuf#mapToSetSerialIndex(s:cache[key], 1)
call fuf#mapToSetAbbrWithSnippedWordAsPath(s:cache[key])
endif
return s:cache[key]
endfunction
" }}}1
"=============================================================================
" s:handler {{{1
let s:handler = {}
"
function s:handler.getModeName()
return s:MODE_NAME
endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(g:fuf_dir_prompt, self.partialMatching, '')
endfunction
"
function s:handler.getPreviewHeight()
return g:fuf_previewHeight
endfunction
"
function s:handler.isOpenable(enteredPattern)
return a:enteredPattern =~# '[^/\\]$'
endfunction
"
function s:handler.makePatternSet(patternBase)
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForPathTail',
\ self.partialMatching)
endfunction
"
function s:handler.makePreviewLines(word, count)
return fuf#makePreviewLinesAround(
\ fuf#glob(fnamemodify(a:word, ':p') . '*'),
\ [], a:count, self.getPreviewHeight())
return
endfunction
"
function s:handler.getCompleteItems(patternPrimary)
return s:enumItems(fuf#splitPath(a:patternPrimary).head)
endfunction
"
function s:handler.onOpen(word, mode)
execute ':cd ' . fnameescape(a:word)
endfunction
"
function s:handler.onModeEnterPre()
endfunction
"
function s:handler.onModeEnterPost()
endfunction
"
function s:handler.onModeLeavePost(opened)
endfunction
" }}}1
"=============================================================================
" vim: set fdm=marker:

139
.vim/autoload/fuf/file.vim Normal file
View File

@ -0,0 +1,139 @@
"=============================================================================
" Copyright (c) 2007-2010 Takeshi NISHIDA
"
"=============================================================================
" LOAD GUARD {{{1
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
" }}}1
"=============================================================================
" GLOBAL FUNCTIONS {{{1
"
function fuf#file#createHandler(base)
return a:base.concretize(copy(s:handler))
endfunction
"
function fuf#file#getSwitchOrder()
return g:fuf_file_switchOrder
endfunction
"
function fuf#file#getEditableDataNames()
return []
endfunction
"
function fuf#file#renewCache()
let s:cache = {}
endfunction
"
function fuf#file#requiresOnCommandPre()
return 0
endfunction
"
function fuf#file#onInit()
call fuf#defineLaunchCommand('FufFile' , s:MODE_NAME, '""', [])
call fuf#defineLaunchCommand('FufFileWithFullCwd' , s:MODE_NAME, 'fnamemodify(getcwd(), '':p'')', [])
call fuf#defineLaunchCommand('FufFileWithCurrentBufferDir', s:MODE_NAME, 'expand(''%:~:.'')[:-1-len(expand(''%:~:.:t''))]', [])
endfunction
" }}}1
"=============================================================================
" LOCAL FUNCTIONS/VARIABLES {{{1
let s:MODE_NAME = expand('<sfile>:t:r')
"
function s:enumItems(dir)
let key = join([getcwd(), g:fuf_ignoreCase, g:fuf_file_exclude, a:dir], "\n")
if !exists('s:cache[key]')
let s:cache[key] = fuf#enumExpandedDirsEntries(a:dir, g:fuf_file_exclude)
call fuf#mapToSetSerialIndex(s:cache[key], 1)
call fuf#mapToSetAbbrWithSnippedWordAsPath(s:cache[key])
endif
return s:cache[key]
endfunction
"
function s:enumNonCurrentItems(dir, bufNrPrev, cache)
let key = a:dir . 'AVOIDING EMPTY KEY'
if !exists('a:cache[key]')
" NOTE: Comparing filenames is faster than bufnr('^' . fname . '$')
let bufNamePrev = bufname(a:bufNrPrev)
let a:cache[key] =
\ filter(copy(s:enumItems(a:dir)), 'v:val.word !=# bufNamePrev')
endif
return a:cache[key]
endfunction
" }}}1
"=============================================================================
" s:handler {{{1
let s:handler = {}
"
function s:handler.getModeName()
return s:MODE_NAME
endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(g:fuf_file_prompt, self.partialMatching, '')
endfunction
"
function s:handler.getPreviewHeight()
return g:fuf_previewHeight
endfunction
"
function s:handler.isOpenable(enteredPattern)
return a:enteredPattern =~# '[^/\\]$'
endfunction
"
function s:handler.makePatternSet(patternBase)
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForPathTail',
\ self.partialMatching)
endfunction
"
function s:handler.makePreviewLines(word, count)
return fuf#makePreviewLinesForFile(a:word, a:count, self.getPreviewHeight())
endfunction
"
function s:handler.getCompleteItems(patternPrimary)
return s:enumNonCurrentItems(
\ fuf#splitPath(a:patternPrimary).head, self.bufNrPrev, self.cache)
endfunction
"
function s:handler.onOpen(word, mode)
call fuf#openFile(a:word, a:mode, g:fuf_reuseWindow)
endfunction
"
function s:handler.onModeEnterPre()
endfunction
"
function s:handler.onModeEnterPost()
let self.cache = {}
endfunction
"
function s:handler.onModeLeavePost(opened)
endfunction
" }}}1
"=============================================================================
" vim: set fdm=marker:

View File

@ -0,0 +1,123 @@
"=============================================================================
" Copyright (c) 2007-2010 Takeshi NISHIDA
"
"=============================================================================
" LOAD GUARD {{{1
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
" }}}1
"=============================================================================
" GLOBAL FUNCTIONS {{{1
"
function fuf#givencmd#createHandler(base)
return a:base.concretize(copy(s:handler))
endfunction
"
function fuf#givencmd#getSwitchOrder()
return -1
endfunction
"
function fuf#givencmd#getEditableDataNames()
return []
endfunction
"
function fuf#givencmd#renewCache()
endfunction
"
function fuf#givencmd#requiresOnCommandPre()
return 0
endfunction
"
function fuf#givencmd#onInit()
endfunction
"
function fuf#givencmd#launch(initialPattern, partialMatching, prompt, items)
let s:prompt = (empty(a:prompt) ? '>' : a:prompt)
let s:items = copy(a:items)
call map(s:items, 'fuf#makeNonPathItem(v:val, "")')
call fuf#mapToSetSerialIndex(s:items, 1)
call map(s:items, 'fuf#setAbbrWithFormattedWord(v:val, 1)')
call fuf#launch(s:MODE_NAME, a:initialPattern, a:partialMatching)
endfunction
" }}}1
"=============================================================================
" LOCAL FUNCTIONS/VARIABLES {{{1
let s:MODE_NAME = expand('<sfile>:t:r')
" }}}1
"=============================================================================
" s:handler {{{1
let s:handler = {}
"
function s:handler.getModeName()
return s:MODE_NAME
endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(s:prompt, self.partialMatching, '')
endfunction
"
function s:handler.getPreviewHeight()
return 0
endfunction
"
function s:handler.isOpenable(enteredPattern)
return 1
endfunction
"
function s:handler.makePatternSet(patternBase)
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath',
\ self.partialMatching)
endfunction
"
function s:handler.makePreviewLines(word, count)
return []
endfunction
"
function s:handler.getCompleteItems(patternPrimary)
return s:items
endfunction
"
function s:handler.onOpen(word, mode)
if a:word[0] =~# '[:/?]'
call histadd(a:word[0], a:word[1:])
endif
call feedkeys(a:word . "\<CR>", 'n')
endfunction
"
function s:handler.onModeEnterPre()
endfunction
"
function s:handler.onModeEnterPost()
endfunction
"
function s:handler.onModeLeavePost(opened)
endfunction
" }}}1
"=============================================================================
" vim: set fdm=marker:

View File

@ -0,0 +1,123 @@
"=============================================================================
" Copyright (c) 2007-2010 Takeshi NISHIDA
"
"=============================================================================
" LOAD GUARD {{{1
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
" }}}1
"=============================================================================
" GLOBAL FUNCTIONS {{{1
"
function fuf#givendir#createHandler(base)
return a:base.concretize(copy(s:handler))
endfunction
"
function fuf#givendir#getSwitchOrder()
return -1
endfunction
"
function fuf#givendir#getEditableDataNames()
return []
endfunction
"
function fuf#givendir#renewCache()
endfunction
"
function fuf#givendir#requiresOnCommandPre()
return 0
endfunction
"
function fuf#givendir#onInit()
endfunction
"
function fuf#givendir#launch(initialPattern, partialMatching, prompt, items)
let s:prompt = (empty(a:prompt) ? '>' : a:prompt)
let s:items = map(copy(a:items), 'substitute(v:val, ''[/\\]\?$'', "", "")')
let s:items = map(s:items, 'fuf#makePathItem(v:val, "", 0)')
call fuf#mapToSetSerialIndex(s:items, 1)
call fuf#mapToSetAbbrWithSnippedWordAsPath(s:items)
call fuf#launch(s:MODE_NAME, a:initialPattern, a:partialMatching)
endfunction
" }}}1
"=============================================================================
" LOCAL FUNCTIONS/VARIABLES {{{1
let s:MODE_NAME = expand('<sfile>:t:r')
" }}}1
"=============================================================================
" s:handler {{{1
let s:handler = {}
"
function s:handler.getModeName()
return s:MODE_NAME
endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(s:prompt, self.partialMatching, '')
endfunction
"
function s:handler.getPreviewHeight()
return g:fuf_previewHeight
endfunction
"
function s:handler.isOpenable(enteredPattern)
return 1
endfunction
"
function s:handler.makePatternSet(patternBase)
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForPath',
\ self.partialMatching)
endfunction
"
function s:handler.makePreviewLines(word, count)
return fuf#makePreviewLinesAround(
\ fuf#glob(fnamemodify(a:word, ':p') . '*'),
\ [], a:count, self.getPreviewHeight())
return
endfunction
"
function s:handler.getCompleteItems(patternPrimary)
return s:items
endfunction
"
function s:handler.onOpen(word, mode)
execute ':cd ' . fnameescape(a:word)
endfunction
"
function s:handler.onModeEnterPre()
endfunction
"
function s:handler.onModeEnterPost()
endfunction
"
function s:handler.onModeLeavePost(opened)
endfunction
" }}}1
"=============================================================================
" vim: set fdm=marker:

View File

@ -0,0 +1,121 @@
"=============================================================================
" Copyright (c) 2007-2010 Takeshi NISHIDA
"
"=============================================================================
" LOAD GUARD {{{1
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
" }}}1
"=============================================================================
" GLOBAL FUNCTIONS {{{1
"
function fuf#givenfile#createHandler(base)
return a:base.concretize(copy(s:handler))
endfunction
"
function fuf#givenfile#getSwitchOrder()
return -1
endfunction
"
function fuf#givenfile#getEditableDataNames()
return []
endfunction
"
function fuf#givenfile#renewCache()
endfunction
"
function fuf#givenfile#requiresOnCommandPre()
return 0
endfunction
"
function fuf#givenfile#onInit()
endfunction
"
function fuf#givenfile#launch(initialPattern, partialMatching, prompt, items)
let s:prompt = (empty(a:prompt) ? '>' : a:prompt)
let s:items = map(copy(a:items), 'fuf#makePathItem(v:val, "", 0)')
call fuf#mapToSetSerialIndex(s:items, 1)
call map(s:items, 'fuf#setAbbrWithFormattedWord(v:val, 1)')
call fuf#launch(s:MODE_NAME, a:initialPattern, a:partialMatching)
endfunction
" }}}1
"=============================================================================
" LOCAL FUNCTIONS/VARIABLES {{{1
let s:MODE_NAME = expand('<sfile>:t:r')
" }}}1
"=============================================================================
" s:handler {{{1
let s:handler = {}
"
function s:handler.getModeName()
return s:MODE_NAME
endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(s:prompt, self.partialMatching, '')
endfunction
"
function s:handler.getPreviewHeight()
return g:fuf_previewHeight
endfunction
"
function s:handler.isOpenable(enteredPattern)
return 1
endfunction
"
function s:handler.makePatternSet(patternBase)
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForPath',
\ self.partialMatching)
endfunction
"
function s:handler.makePreviewLines(word, count)
return fuf#makePreviewLinesForFile(a:word, a:count, self.getPreviewHeight())
endfunction
"
function s:handler.getCompleteItems(patternPrimary)
return s:items
endfunction
"
function s:handler.onOpen(word, mode)
call fuf#openFile(a:word, a:mode, g:fuf_reuseWindow)
endfunction
"
function s:handler.onModeEnterPre()
endfunction
"
function s:handler.onModeEnterPost()
endfunction
"
function s:handler.onModeLeavePost(opened)
endfunction
" }}}1
"=============================================================================
" vim: set fdm=marker:

198
.vim/autoload/fuf/help.vim Normal file
View File

@ -0,0 +1,198 @@
"=============================================================================
" Copyright (c) 2007-2010 Takeshi NISHIDA
"
"=============================================================================
" LOAD GUARD {{{1
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
" }}}1
"=============================================================================
" GLOBAL FUNCTIONS {{{1
"
function fuf#help#createHandler(base)
return a:base.concretize(copy(s:handler))
endfunction
"
function fuf#help#getSwitchOrder()
return g:fuf_help_switchOrder
endfunction
"
function fuf#help#getEditableDataNames()
return []
endfunction
"
function fuf#help#renewCache()
let s:cache = {}
endfunction
"
function fuf#help#requiresOnCommandPre()
return 0
endfunction
"
function fuf#help#onInit()
call fuf#defineLaunchCommand('FufHelp' , s:MODE_NAME, '""', [])
call fuf#defineLaunchCommand('FufHelpWithCursorWord', s:MODE_NAME, 'expand(''<cword>'')', [])
endfunction
" }}}1
"=============================================================================
" LOCAL FUNCTIONS/VARIABLES {{{1
let s:MODE_NAME = expand('<sfile>:t:r')
"
function s:getCurrentHelpTagFiles()
let prefix = 'doc' . l9#getPathSeparator()
let tagFiles = split(globpath(&runtimepath, prefix . 'tags' ), "\n")
\ + split(globpath(&runtimepath, prefix . 'tags-??'), "\n")
return sort(map(tagFiles, 'fnamemodify(v:val, ":p")'))
endfunction
"
function s:parseHelpTagEntry(line, tagFile)
let elements = split(a:line, "\t")
if len(elements) != 3 || elements[0][0] ==# '!'
return {}
endif
let suffix = matchstr(a:tagFile, '-\zs..$')
if empty(suffix)
let suffix = '@en'
else
let suffix = '@' . suffix
endif
let dir = fnamemodify(a:tagFile, ':h') . l9#getPathSeparator()
return {
\ 'word' : elements[0] . suffix,
\ 'path' : dir . elements[1],
\ 'pattern': elements[2][1:],
\ }
endfunction
"
function s:getHelpTagEntries(tagFile)
let names = map(l9#readFile(a:tagFile), 's:parseHelpTagEntry(v:val, a:tagFile)')
return filter(names, '!empty(v:val)')
endfunction
"
function s:parseHelpTagFiles(tagFiles, key)
let cacheName = 'cache-' . l9#hash224(a:key)
let cacheTime = fuf#getDataFileTime(s:MODE_NAME, cacheName)
if cacheTime != -1 && fuf#countModifiedFiles(a:tagFiles, cacheTime) == 0
return fuf#loadDataFile(s:MODE_NAME, cacheName)
endif
let items = l9#unique(l9#concat(map(copy(a:tagFiles), 's:getHelpTagEntries(v:val)')))
let items = map(items, 'extend(v:val, fuf#makeNonPathItem(v:val.word, ""))')
call fuf#mapToSetSerialIndex(items, 1)
let items = map(items, 'fuf#setAbbrWithFormattedWord(v:val, 1)')
call fuf#saveDataFile(s:MODE_NAME, cacheName, items)
return items
endfunction
"
function s:enumHelpTags(tagFiles)
if !len(a:tagFiles)
return []
endif
let key = join([g:fuf_ignoreCase] + a:tagFiles, "\n")
if !exists('s:cache[key]') || fuf#countModifiedFiles(a:tagFiles, s:cache[key].time)
let s:cache[key] = {
\ 'time' : localtime(),
\ 'items' : s:parseHelpTagFiles(a:tagFiles, key)
\ }
endif
return s:cache[key].items
endfunction
"
function s:getMatchingIndex(lines, pattern)
if empty(a:pattern)
return -1
endif
for i in range(len(a:lines))
if stridx(a:lines[i], a:pattern) >= 0
return i
endif
endfor
return -1
endfunction
" }}}1
"=============================================================================
" s:handler {{{1
let s:handler = {}
"
function s:handler.getModeName()
return s:MODE_NAME
endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(g:fuf_help_prompt, self.partialMatching, '')
endfunction
"
function s:handler.getPreviewHeight()
return g:fuf_previewHeight
endfunction
"
function s:handler.isOpenable(enteredPattern)
return 1
endfunction
"
function s:handler.makePatternSet(patternBase)
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath',
\ self.partialMatching)
endfunction
"
function s:handler.makePreviewLines(word, count)
let items = filter(copy(s:enumHelpTags(self.tagFiles)), 'v:val.word ==# a:word')
if empty(items)
return []
endif
let lines = fuf#getFileLines(items[0].path)
let index = s:getMatchingIndex(lines, items[0].pattern)
return [items[0].path . ':'] + fuf#makePreviewLinesAround(
\ lines, (index < 0 ? [] : [index]), a:count, self.getPreviewHeight() - 1)
endfunction
"
function s:handler.getCompleteItems(patternPrimary)
return s:enumHelpTags(self.tagFiles)
endfunction
"
function s:handler.onOpen(word, mode)
call fuf#openHelp(a:word, a:mode)
endfunction
"
function s:handler.onModeEnterPre()
let self.tagFiles = s:getCurrentHelpTagFiles()
endfunction
"
function s:handler.onModeEnterPost()
endfunction
"
function s:handler.onModeLeavePost(opened)
endfunction
" }}}1
"=============================================================================
" vim: set fdm=marker:

View File

@ -0,0 +1,182 @@
"=============================================================================
" Copyright (c) 2007-2010 Takeshi NISHIDA
"
"=============================================================================
" LOAD GUARD {{{1
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
" }}}1
"=============================================================================
" GLOBAL FUNCTIONS {{{1
"
function fuf#jumplist#createHandler(base)
return a:base.concretize(copy(s:handler))
endfunction
"
function fuf#jumplist#getSwitchOrder()
return g:fuf_jumplist_switchOrder
endfunction
"
function fuf#jumplist#getEditableDataNames()
return []
endfunction
"
function fuf#jumplist#renewCache()
endfunction
"
function fuf#jumplist#requiresOnCommandPre()
return 0
endfunction
"
function fuf#jumplist#onInit()
call fuf#defineLaunchCommand('FufJumpList', s:MODE_NAME, '""', [])
endfunction
" }}}1
"=============================================================================
" LOCAL FUNCTIONS/VARIABLES {{{1
let s:MODE_NAME = expand('<sfile>:t:r')
"
function s:getJumpsLines()
redir => result
:silent jumps
redir END
return split(result, "\n")
endfunction
"
function s:parseJumpsLine(line, bufnrPrev)
"return matchlist(a:line, '^\(.\)\s\+\(\d\+\)\s\(.*\)$')
let elements = matchlist(a:line, '\v^(.)\s*(\d+)\s+(\d+)\s+(\d+)\s*(.*)$')
if empty(elements)
return {}
endif
let linePrevBuffer = join(getbufline(a:bufnrPrev, elements[3]))
if stridx(linePrevBuffer, elements[5]) >= 0
let fname = bufname(a:bufnrPrev)
let text = elements[5]
else
let fname = elements[5]
let text = join(getbufline('^' . elements[5] . '$', elements[3]))
endif
return {
\ 'prefix': elements[1],
\ 'count' : elements[2],
\ 'lnum' : elements[3],
\ 'fname' : fname,
\ 'text' : printf('%s|%d:%d|%s', fname, elements[3], elements[4], text),
\ }
endfunction
"
function s:makeItem(line, bufnrPrev)
let parsed = s:parseJumpsLine(a:line, a:bufnrPrev)
if empty(parsed)
return {}
endif
let item = fuf#makeNonPathItem(parsed.text, '')
let item.abbrPrefix = parsed.prefix
let item.lnum = parsed.lnum
let item.fname = parsed.fname
return item
endfunction
" }}}1
"=============================================================================
" s:handler {{{1
let s:handler = {}
"
function s:handler.getModeName()
return s:MODE_NAME
endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(g:fuf_jumplist_prompt, self.partialMatching, '')
endfunction
"
function s:handler.getPreviewHeight()
return g:fuf_previewHeight
endfunction
"
function s:handler.isOpenable(enteredPattern)
return 1
endfunction
"
function s:handler.makePatternSet(patternBase)
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath',
\ self.partialMatching)
endfunction
"
function s:handler.makePreviewLines(word, count)
let items = filter(copy(self.items), 'v:val.word ==# a:word')
if empty(items)
return []
endif
let lines = fuf#getFileLines(items[0].fname)
return fuf#makePreviewLinesAround(
\ lines, [items[0].lnum - 1], a:count, self.getPreviewHeight())
endfunction
"
function s:handler.getCompleteItems(patternPrimary)
return self.items
endfunction
"
function s:handler.onOpen(word, mode)
call fuf#prejump(a:mode)
let older = 0
for line in reverse(s:getJumpsLines())
if stridx(line, '>') == 0
let older = 1
endif
let parsed = s:parseJumpsLine(line, self.bufNrPrev)
if !empty(parsed) && parsed.text ==# a:word
if parsed.count != 0
execute 'normal! ' . parsed.count . (older ? "\<C-o>" : "\<C-i>") . 'zvzz'
endif
break
endif
endfor
endfunction
"
function s:handler.onModeEnterPre()
let self.items = s:getJumpsLines()
endfunction
"
function s:handler.onModeEnterPost()
call map(self.items, 's:makeItem(v:val, self.bufNrPrev)')
call filter(self.items, '!empty(v:val)')
call reverse(self.items)
call fuf#mapToSetSerialIndex(self.items, 1)
call map(self.items, 'fuf#setAbbrWithFormattedWord(v:val, 1)')
endfunction
"
function s:handler.onModeLeavePost(opened)
endfunction
" }}}1
"=============================================================================
" vim: set fdm=marker:

135
.vim/autoload/fuf/line.vim Normal file
View File

@ -0,0 +1,135 @@
"=============================================================================
" Copyright (c) 2007-2010 Takeshi NISHIDA
"
"=============================================================================
" LOAD GUARD {{{1
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
" }}}1
"=============================================================================
" GLOBAL FUNCTIONS {{{1
"
function fuf#line#createHandler(base)
return a:base.concretize(copy(s:handler))
endfunction
"
function fuf#line#getSwitchOrder()
return g:fuf_line_switchOrder
endfunction
"
function fuf#line#getEditableDataNames()
return []
endfunction
"
function fuf#line#renewCache()
endfunction
"
function fuf#line#requiresOnCommandPre()
return 0
endfunction
"
function fuf#line#onInit()
call fuf#defineLaunchCommand('FufLine', s:MODE_NAME, '""', [])
endfunction
" }}}1
"=============================================================================
" LOCAL FUNCTIONS/VARIABLES {{{1
let s:MODE_NAME = expand('<sfile>:t:r')
let s:OPEN_TYPE_DELETE = -1
" }}}1
"=============================================================================
" s:handler {{{1
let s:handler = {}
"
function s:handler.getModeName()
return s:MODE_NAME
endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(g:fuf_line_prompt, self.partialMatching, '')
endfunction
"
function s:handler.getPreviewHeight()
return g:fuf_previewHeight
endfunction
"
function s:handler.isOpenable(enteredPattern)
return 1
endfunction
"
function s:handler.makePatternSet(patternBase)
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath',
\ self.partialMatching)
endfunction
"
function s:handler.makePreviewLines(word, count)
let items = filter(copy(self.items), 'v:val.word ==# a:word')
if empty(items)
return []
endif
let lines = fuf#getFileLines(self.bufNrPrev)
return fuf#makePreviewLinesAround(
\ lines, [items[0].index - 1], a:count, self.getPreviewHeight())
endfunction
"
function s:handler.getCompleteItems(patternPrimary)
return self.items
endfunction
"
function s:handler.onOpen(word, mode)
call fuf#prejump(a:mode)
call filter(self.items, 'v:val.word ==# a:word')
if empty(self.items)
return
execute 'cc ' . self.items[0].index
endif
call cursor(self.items[0].index, 0)
normal! zvzz
endfunction
"
function s:handler.onModeEnterPre()
endfunction
"
function s:handler.onModeEnterPost()
let tab = repeat(' ', getbufvar(self.bufNrPrev, '&tabstop'))
let self.items = getbufline(self.bufNrPrev, 1, '$')
let lnumFormat = '%' . len(string(len(self.items) + 1)) . 'd|'
for i in range(len(self.items))
let self.items[i] = printf(lnumFormat, i + 1)
\ . substitute(self.items[i], "\t", tab, 'g')
endfor
call map(self.items, 'fuf#makeNonPathItem(v:val, "")')
call fuf#mapToSetSerialIndex(self.items, 1)
call map(self.items, 'fuf#setAbbrWithFormattedWord(v:val, 0)')
endfunction
"
function s:handler.onModeLeavePost(opened)
endfunction
" }}}1
"=============================================================================
" vim: set fdm=marker:

View File

@ -0,0 +1,134 @@
"=============================================================================
" Copyright (c) 2007-2010 Takeshi NISHIDA
"
"=============================================================================
" LOAD GUARD {{{1
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
" }}}1
"=============================================================================
" GLOBAL FUNCTIONS {{{1
"
function fuf#mrucmd#createHandler(base)
return a:base.concretize(copy(s:handler))
endfunction
"
function fuf#mrucmd#getSwitchOrder()
return g:fuf_mrucmd_switchOrder
endfunction
"
function fuf#mrucmd#getEditableDataNames()
return ['items']
endfunction
"
function fuf#mrucmd#renewCache()
endfunction
"
function fuf#mrucmd#requiresOnCommandPre()
return 1
endfunction
"
function fuf#mrucmd#onInit()
call fuf#defineLaunchCommand('FufMruCmd', s:MODE_NAME, '""', [])
endfunction
"
function fuf#mrucmd#onCommandPre(cmd)
if getcmdtype() =~# '^[:/?]'
call s:updateInfo(a:cmd)
endif
endfunction
" }}}1
"=============================================================================
" LOCAL FUNCTIONS/VARIABLES {{{1
let s:MODE_NAME = expand('<sfile>:t:r')
"
function s:updateInfo(cmd)
let items = fuf#loadDataFile(s:MODE_NAME, 'items')
let items = fuf#updateMruList(
\ items, { 'word' : a:cmd, 'time' : localtime() },
\ g:fuf_mrucmd_maxItem, g:fuf_mrucmd_exclude)
call fuf#saveDataFile(s:MODE_NAME, 'items', items)
endfunction
" }}}1
"=============================================================================
" s:handler {{{1
let s:handler = {}
"
function s:handler.getModeName()
return s:MODE_NAME
endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(g:fuf_mrucmd_prompt, self.partialMatching, '')
endfunction
"
function s:handler.getPreviewHeight()
return 0
endfunction
"
function s:handler.isOpenable(enteredPattern)
return 1
endfunction
"
function s:handler.makePatternSet(patternBase)
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath',
\ self.partialMatching)
endfunction
"
function s:handler.makePreviewLines(word, count)
return []
endfunction
"
function s:handler.getCompleteItems(patternPrimary)
return self.items
endfunction
"
function s:handler.onOpen(word, mode)
call s:updateInfo(a:word)
call histadd(a:word[0], a:word[1:])
call feedkeys(a:word . "\<CR>", 'n')
endfunction
"
function s:handler.onModeEnterPre()
endfunction
"
function s:handler.onModeEnterPost()
let self.items = fuf#loadDataFile(s:MODE_NAME, 'items')
call map(self.items, 'fuf#makeNonPathItem(v:val.word, strftime(g:fuf_timeFormat, v:val.time))')
call fuf#mapToSetSerialIndex(self.items, 1)
call map(self.items, 'fuf#setAbbrWithFormattedWord(v:val, 1)')
endfunction
"
function s:handler.onModeLeavePost(opened)
endfunction
" }}}1
"=============================================================================
" vim: set fdm=marker:

View File

@ -0,0 +1,234 @@
"=============================================================================
" Copyright (c) 2007-2010 Takeshi NISHIDA
"
"=============================================================================
" LOAD GUARD {{{1
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
" }}}1
"=============================================================================
" GLOBAL FUNCTIONS {{{1
"
function fuf#mrufile#createHandler(base)
return a:base.concretize(copy(s:handler))
endfunction
"
function fuf#mrufile#getSwitchOrder()
return g:fuf_mrufile_switchOrder
endfunction
"
function fuf#mrufile#getEditableDataNames()
return ['items', 'itemdirs']
endfunction
"
function fuf#mrufile#renewCache()
let s:cache = {}
let s:aroundCache = {}
endfunction
"
function fuf#mrufile#requiresOnCommandPre()
return 0
endfunction
"
function fuf#mrufile#onInit()
call fuf#defineLaunchCommand('FufMruFile', s:MODE_NAME, '""', [])
call fuf#defineLaunchCommand('FufMruFileInCwd', s:MODE_NAME,
\ '""', [['g:fuf_mrufile_underCwd', 1]])
call l9#defineVariableDefault('g:fuf_mrufile_underCwd', 0) " private option
call l9#defineVariableDefault('g:fuf_mrufile_searchAroundLevel', -1) " private option
augroup fuf#mrufile
autocmd!
autocmd BufEnter * call s:updateData()
autocmd BufWritePost * call s:updateData()
augroup END
endfunction
" }}}1
"=============================================================================
" LOCAL FUNCTIONS/VARIABLES {{{1
let s:MODE_NAME = expand('<sfile>:t:r')
let s:OPEN_TYPE_EXPAND = -1
"
function s:updateData()
if !empty(&buftype) || !filereadable(expand('%'))
return
endif
let items = fuf#loadDataFile(s:MODE_NAME, 'items')
let items = fuf#updateMruList(
\ items, { 'word' : expand('%:p'), 'time' : localtime() },
\ g:fuf_mrufile_maxItem, g:fuf_mrufile_exclude)
call fuf#saveDataFile(s:MODE_NAME, 'items', items)
call s:removeItemFromCache(expand('%:p'))
let itemDirs = fuf#loadDataFile(s:MODE_NAME, 'itemdirs')
let itemDirs = fuf#updateMruList(
\ itemDirs, { 'word' : expand('%:p:h') },
\ g:fuf_mrufile_maxItemDir, g:fuf_mrufile_exclude)
call fuf#saveDataFile(s:MODE_NAME, 'itemdirs', itemDirs)
endfunction
"
function s:removeItemFromCache(word)
for items in values(s:cache)
if exists('items[a:word]')
unlet items[a:word]
endif
endfor
endfunction
" returns empty value if invalid item
function s:formatItemUsingCache(item)
if a:item.word !~ '\S'
return {}
endif
if !exists('s:cache[a:item.word]')
if filereadable(a:item.word)
let s:cache[a:item.word] = fuf#makePathItem(
\ fnamemodify(a:item.word, ':p:~'), strftime(g:fuf_timeFormat, a:item.time), 0)
else
let s:cache[a:item.word] = {}
endif
endif
return s:cache[a:item.word]
endfunction
"
function s:expandSearchDir(dir, level)
let dirs = [a:dir]
let dirPrev = a:dir
for i in range(a:level)
let dirPrev = l9#concatPaths([dirPrev, '*'])
call add(dirs, dirPrev)
endfor
let dirPrev = a:dir
for i in range(a:level)
let dirPrevPrev = dirPrev
let dirPrev = fnamemodify(dirPrev, ':h')
if dirPrevPrev ==# dirPrev
break
endif
call add(dirs, dirPrev)
endfor
return dirs
endfunction
"
function s:listAroundFiles(dir)
if !exists('s:aroundCache[a:dir]')
let s:aroundCache[a:dir] = [a:dir] +
\ fuf#glob(l9#concatPaths([a:dir, '*' ])) +
\ fuf#glob(l9#concatPaths([a:dir, '.*']))
call filter(s:aroundCache[a:dir], 'filereadable(v:val)')
call map(s:aroundCache[a:dir], 'fuf#makePathItem(fnamemodify(v:val, ":~"), "", 0)')
if len(g:fuf_mrufile_exclude)
call filter(s:aroundCache[a:dir], 'v:val.word !~ g:fuf_mrufile_exclude')
endif
endif
return s:aroundCache[a:dir]
endfunction
" }}}1
"=============================================================================
" s:handler {{{1
let s:handler = {}
"
function s:handler.getModeName()
return s:MODE_NAME
endfunction
"
function s:handler.getPrompt()
let cwdString = (g:fuf_mrufile_underCwd ? '[CWD]' : '')
let levelString = (g:fuf_mrufile_searchAroundLevel < 0 ? ''
\ : '[Around:' . g:fuf_mrufile_searchAroundLevel . ']')
return fuf#formatPrompt(g:fuf_mrufile_prompt, self.partialMatching, cwdString . levelString)
endfunction
"
function s:handler.getPreviewHeight()
return g:fuf_previewHeight
endfunction
"
function s:handler.isOpenable(enteredPattern)
return 1
endfunction
"
function s:handler.makePatternSet(patternBase)
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForPath',
\ self.partialMatching)
endfunction
"
function s:handler.makePreviewLines(word, count)
return fuf#makePreviewLinesForFile(a:word, a:count, self.getPreviewHeight())
endfunction
"
function s:handler.getCompleteItems(patternPrimary)
return self.items
endfunction
"
function s:handler.onOpen(word, mode)
if a:mode ==# s:OPEN_TYPE_EXPAND
let nextLevel = (self.searchAroundLevel < 0 ? 0 : self.searchAroundLevel + 1)
call fuf#setOneTimeVariables(['g:fuf_mrufile_searchAroundLevel', nextLevel])
let self.reservedMode = self.getModeName()
return
else
call fuf#openFile(a:word, a:mode, g:fuf_reuseWindow)
endif
endfunction
"
function s:handler.onModeEnterPre()
endfunction
"
function s:handler.onModeEnterPost()
let self.searchAroundLevel = g:fuf_mrufile_searchAroundLevel
call fuf#defineKeyMappingInHandler(g:fuf_mrufile_keyExpand,
\ 'onCr(' . s:OPEN_TYPE_EXPAND . ')')
if self.searchAroundLevel < 0
let self.items = fuf#loadDataFile(s:MODE_NAME, 'items')
call map(self.items, 's:formatItemUsingCache(v:val)')
else
let self.items = fuf#loadDataFile(s:MODE_NAME, 'itemdirs')
call map(self.items, 's:expandSearchDir(v:val.word, g:fuf_mrufile_searchAroundLevel)')
let self.items = l9#concat(self.items)
let self.items = l9#unique(self.items)
call map(self.items, 's:listAroundFiles(v:val)')
let self.items = l9#concat(self.items)
endif
" NOTE: Comparing filenames is faster than bufnr('^' . fname . '$')
let bufNamePrev = fnamemodify(bufname(self.bufNrPrev), ':p:~')
call filter(self.items, '!empty(v:val) && v:val.word !=# bufNamePrev')
if g:fuf_mrufile_underCwd
let cwd = fnamemodify(getcwd(), ':p:~')
call filter(self.items, 'stridx(v:val.word, cwd) == 0')
endif
call fuf#mapToSetSerialIndex(self.items, 1)
call fuf#mapToSetAbbrWithSnippedWordAsPath(self.items)
endfunction
"
function s:handler.onModeLeavePost(opened)
endfunction
" }}}1
"=============================================================================
" vim: set fdm=marker:

View File

@ -0,0 +1,154 @@
"=============================================================================
" Copyright (c) 2007-2010 Takeshi NISHIDA
"
"=============================================================================
" LOAD GUARD {{{1
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
" }}}1
"=============================================================================
" GLOBAL FUNCTIONS {{{1
"
function fuf#quickfix#createHandler(base)
return a:base.concretize(copy(s:handler))
endfunction
"
function fuf#quickfix#getSwitchOrder()
return g:fuf_quickfix_switchOrder
endfunction
"
function fuf#quickfix#getEditableDataNames()
return []
endfunction
"
function fuf#quickfix#renewCache()
endfunction
"
function fuf#quickfix#requiresOnCommandPre()
return 0
endfunction
"
function fuf#quickfix#onInit()
call fuf#defineLaunchCommand('FufQuickfix', s:MODE_NAME, '""', [])
endfunction
" }}}1
"=============================================================================
" LOCAL FUNCTIONS/VARIABLES {{{1
let s:MODE_NAME = expand('<sfile>:t:r')
"
function s:getJumpsLines()
redir => result
:silent jumps
redir END
return split(result, "\n")
endfunction
"
function s:parseJumpsLine(line)
return matchlist(a:line, '^\(.\)\s\+\(\d\+\)\s\(.*\)$')
endfunction
"
function s:makeItem(qfItem)
if !a:qfItem.valid
return {}
endif
let item = fuf#makeNonPathItem(
\ printf('%s|%d:%d|%s', bufname(a:qfItem.bufnr), a:qfItem.lnum,
\ a:qfItem.col, matchstr(a:qfItem.text, '\s*\zs.*\S'))
\ , '')
let item.bufnr = a:qfItem.bufnr
let item.lnum = a:qfItem.lnum
return item
endfunction
" }}}1
"=============================================================================
" s:handler {{{1
let s:handler = {}
"
function s:handler.getModeName()
return s:MODE_NAME
endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(g:fuf_quickfix_prompt, self.partialMatching, '')
endfunction
"
function s:handler.getPreviewHeight()
return g:fuf_previewHeight
endfunction
"
function s:handler.isOpenable(enteredPattern)
return 1
endfunction
"
function s:handler.makePatternSet(patternBase)
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath',
\ self.partialMatching)
endfunction
"
function s:handler.makePreviewLines(word, count)
let items = filter(copy(self.items), 'v:val.word ==# a:word')
if empty(items)
return []
endif
let lines = fuf#getFileLines(items[0].bufnr)
return fuf#makePreviewLinesAround(
\ lines, [items[0].lnum - 1], a:count, self.getPreviewHeight())
endfunction
"
function s:handler.getCompleteItems(patternPrimary)
return self.items
endfunction
"
function s:handler.onOpen(word, mode)
call fuf#prejump(a:mode)
call filter(self.items, 'v:val.word ==# a:word')
if !empty(self.items)
execute 'cc ' . self.items[0].index
endif
endfunction
"
function s:handler.onModeEnterPre()
endfunction
"
function s:handler.onModeEnterPost()
let self.items = getqflist()
call map(self.items, 's:makeItem(v:val)')
call fuf#mapToSetSerialIndex(self.items, 1)
call filter(self.items, 'exists("v:val.word")')
call map(self.items, 'fuf#setAbbrWithFormattedWord(v:val, 1)')
endfunction
"
function s:handler.onModeLeavePost(opened)
endfunction
" }}}1
"=============================================================================
" vim: set fdm=marker:

178
.vim/autoload/fuf/tag.vim Normal file
View File

@ -0,0 +1,178 @@
"=============================================================================
" Copyright (c) 2007-2010 Takeshi NISHIDA
"
"=============================================================================
" LOAD GUARD {{{1
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
" }}}1
"=============================================================================
" GLOBAL FUNCTIONS {{{1
"
function fuf#tag#createHandler(base)
return a:base.concretize(copy(s:handler))
endfunction
"
function fuf#tag#getSwitchOrder()
return g:fuf_tag_switchOrder
endfunction
"
function fuf#tag#getEditableDataNames()
return []
endfunction
"
function fuf#tag#renewCache()
let s:cache = {}
endfunction
"
function fuf#tag#requiresOnCommandPre()
return 0
endfunction
"
function fuf#tag#onInit()
call fuf#defineLaunchCommand('FufTag' , s:MODE_NAME, '""', [])
call fuf#defineLaunchCommand('FufTagWithCursorWord', s:MODE_NAME, 'expand(''<cword>'')', [])
endfunction
" }}}1
"=============================================================================
" LOCAL FUNCTIONS/VARIABLES {{{1
let s:MODE_NAME = expand('<sfile>:t:r')
"
function s:getTagNames(tagFile)
let names = map(l9#readFile(a:tagFile), 'matchstr(v:val, ''^[^!\t][^\t]*'')')
return filter(names, 'v:val =~# ''\S''')
endfunction
"
function s:parseTagFiles(tagFiles, key)
let cacheName = 'cache-' . l9#hash224(a:key)
let cacheTime = fuf#getDataFileTime(s:MODE_NAME, cacheName)
if cacheTime != -1 && fuf#countModifiedFiles(a:tagFiles, cacheTime) == 0
return fuf#loadDataFile(s:MODE_NAME, cacheName)
endif
let items = l9#unique(l9#concat(map(copy(a:tagFiles), 's:getTagNames(v:val)')))
let items = map(items, 'fuf#makeNonPathItem(v:val, "")')
call fuf#mapToSetSerialIndex(items, 1)
let items = map(items, 'fuf#setAbbrWithFormattedWord(v:val, 1)')
call fuf#saveDataFile(s:MODE_NAME, cacheName, items)
return items
endfunction
"
function s:enumTags(tagFiles)
if !len(a:tagFiles)
return []
endif
let key = join([g:fuf_ignoreCase] + a:tagFiles, "\n")
if !exists('s:cache[key]') || fuf#countModifiedFiles(a:tagFiles, s:cache[key].time)
let s:cache[key] = {
\ 'time' : localtime(),
\ 'items' : s:parseTagFiles(a:tagFiles, key)
\ }
endif
return s:cache[key].items
endfunction
"
function s:getMatchingIndex(lines, cmd)
if a:cmd !~# '\D'
return str2nr(a:cmd)
endif
let pattern = matchstr(a:cmd, '^\/\^\zs.*\ze\$\/$')
if empty(pattern)
return -1
endif
for i in range(len(a:lines))
if a:lines[i] ==# pattern
return i
endif
endfor
return -1
endfunction
" }}}1
"=============================================================================
" s:handler {{{1
let s:handler = {}
"
function s:handler.getModeName()
return s:MODE_NAME
endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(g:fuf_tag_prompt, self.partialMatching, '')
endfunction
"
function s:handler.getPreviewHeight()
return g:fuf_previewHeight
endfunction
"
function s:handler.isOpenable(enteredPattern)
return 1
endfunction
"
function s:handler.makePatternSet(patternBase)
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath',
\ self.partialMatching)
endfunction
" 'cmd' is '/^hoge hoge$/' or line number
function s:handler.makePreviewLines(word, count)
let tags = taglist('^' . a:word . '$')
if empty(tags)
return []
endif
let i = a:count % len(tags)
let title = printf('(%d/%d) %s', i + 1, len(tags), tags[i].filename)
let lines = fuf#getFileLines(tags[i].filename)
let index = s:getMatchingIndex(lines, tags[i].cmd)
return [title] + fuf#makePreviewLinesAround(
\ lines, (index < 0 ? [] : [index]), 0, self.getPreviewHeight() - 1)
endfunction
"
function s:handler.getCompleteItems(patternPrimary)
return s:enumTags(self.tagFiles)
endfunction
"
function s:handler.onOpen(word, mode)
call fuf#openTag(a:word, a:mode)
endfunction
"
function s:handler.onModeEnterPre()
let self.tagFiles = fuf#getCurrentTagFiles()
endfunction
"
function s:handler.onModeEnterPost()
let &l:tags = join(self.tagFiles, ',')
endfunction
"
function s:handler.onModeLeavePost(opened)
let &l:tags = ''
endfunction
" }}}1
"=============================================================================
" vim: set fdm=marker:

View File

@ -0,0 +1,159 @@
"=============================================================================
" Copyright (c) 2007-2010 Takeshi NISHIDA
"
"=============================================================================
" LOAD GUARD {{{1
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
" }}}1
"=============================================================================
" GLOBAL FUNCTIONS {{{1
"
function fuf#taggedfile#createHandler(base)
return a:base.concretize(copy(s:handler))
endfunction
"
function fuf#taggedfile#getSwitchOrder()
return g:fuf_taggedfile_switchOrder
endfunction
"
function fuf#taggedfile#getEditableDataNames()
return []
endfunction
"
function fuf#taggedfile#renewCache()
let s:cache = {}
endfunction
"
function fuf#taggedfile#requiresOnCommandPre()
return 0
endfunction
"
function fuf#taggedfile#onInit()
call fuf#defineLaunchCommand('FufTaggedFile', s:MODE_NAME, '""', [])
endfunction
" }}}1
"=============================================================================
" LOCAL FUNCTIONS/VARIABLES {{{1
let s:MODE_NAME = expand('<sfile>:t:r')
"
function s:getTaggedFileList(tagfile)
execute 'cd ' . fnamemodify(a:tagfile, ':h')
let result = map(l9#readFile(a:tagfile), 'matchstr(v:val, ''^[^!\t][^\t]*\t\zs[^\t]\+'')')
call map(l9#readFile(a:tagfile), 'fnamemodify(v:val, ":p")')
cd -
call map(l9#readFile(a:tagfile), 'fnamemodify(v:val, ":~:.")')
return filter(result, 'v:val =~# ''[^/\\ ]$''')
endfunction
"
function s:parseTagFiles(tagFiles, key)
let cacheName = 'cache-' . l9#hash224(a:key)
let cacheTime = fuf#getDataFileTime(s:MODE_NAME, cacheName)
if cacheTime != -1 && fuf#countModifiedFiles(a:tagFiles, cacheTime) == 0
return fuf#loadDataFile(s:MODE_NAME, cacheName)
endif
let items = l9#unique(l9#concat(map(copy(a:tagFiles), 's:getTaggedFileList(v:val)')))
call map(items, 'fuf#makePathItem(v:val, "", 0)')
call fuf#mapToSetSerialIndex(items, 1)
call fuf#mapToSetAbbrWithSnippedWordAsPath(items)
call fuf#saveDataFile(s:MODE_NAME, cacheName, items)
return items
endfunction
"
function s:enumTaggedFiles(tagFiles)
if !len(a:tagFiles)
return []
endif
let key = join([getcwd(), g:fuf_ignoreCase] + a:tagFiles, "\n")
if !exists('s:cache[key]') || fuf#countModifiedFiles(a:tagFiles, s:cache[key].time)
let s:cache[key] = {
\ 'time' : localtime(),
\ 'items' : s:parseTagFiles(a:tagFiles, key)
\ }
endif
return s:cache[key].items
endfunction
" }}}1
"=============================================================================
" s:handler {{{1
let s:handler = {}
"
function s:handler.getModeName()
return s:MODE_NAME
endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(g:fuf_taggedfile_prompt, self.partialMatching, '')
endfunction
"
function s:handler.getPreviewHeight()
return g:fuf_previewHeight
endfunction
"
function s:handler.isOpenable(enteredPattern)
return 1
endfunction
"
function s:handler.makePatternSet(patternBase)
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForPath',
\ self.partialMatching)
endfunction
"
function s:handler.makePreviewLines(word, count)
return fuf#makePreviewLinesForFile(a:word, a:count, self.getPreviewHeight())
endfunction
"
function s:handler.getCompleteItems(patternPrimary)
return self.items
endfunction
"
function s:handler.onOpen(word, mode)
call fuf#openFile(a:word, a:mode, g:fuf_reuseWindow)
endfunction
"
function s:handler.onModeEnterPre()
let self.tagFiles = fuf#getCurrentTagFiles()
endfunction
"
function s:handler.onModeEnterPost()
" NOTE: Comparing filenames is faster than bufnr('^' . fname . '$')
let bufNamePrev = fnamemodify(bufname(self.bufNrPrev), ':p:~:.')
" NOTE: Don't do this in onModeEnterPre()
" because that should return in a short time.
let self.items = copy(s:enumTaggedFiles(self.tagFiles))
call filter(self.items, 'v:val.word !=# bufNamePrev')
endfunction
"
function s:handler.onModeLeavePost(opened)
endfunction
" }}}1
"=============================================================================
" vim: set fdm=marker:

27
.vim/colors/backbone.vim Normal file
View File

@ -0,0 +1,27 @@
" Vim color file
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2001 Jul 23
" This is the default color scheme. It doesn't define the Normal
" highlighting, it uses whatever the colors used to be.
" Set 'background' back to the default. The value can't always be estimated
" and is then guessed.
hi clear Normal
set bg&
" Remove all existing highlighting and set the defaults.
hi clear
" Load the syntax highlighting defaults, if it's enabled.
if exists("syntax_on")
syntax reset
endif
let colors_name = "default"
hi Comment term=bold ctermfg=darkcyan guifg=Red
hi Folded ctermfg=darkgrey ctermbg=NONE
hi FoldColumn ctermfg=darkgrey ctermbg=NONE
" vim: sw=2

1291
.vim/doc/NERD_tree.txt Normal file

File diff suppressed because it is too large Load Diff

1405
.vim/doc/fuf.jax Normal file

File diff suppressed because it is too large Load Diff

1883
.vim/doc/fuf.txt Normal file

File diff suppressed because it is too large Load Diff

257
.vim/doc/fugitive.txt Normal file
View File

@ -0,0 +1,257 @@
*fugitive.txt* A Git wrapper so awesome, it should be illegal
Author: Tim Pope <vimNOSPAM@tpope.org> *fugitive-author*
License: Same terms as Vim itself (see |license|)
This plugin is only available if 'compatible' is not set.
INTRODUCTION *fugitive*
Install in ~/.vim, or in ~\vimfiles if you're on Windows and feeling lucky.
Vim 7.2 is recommended as it ships with syntax highlighting for many Git file
types.
If you're in a hurry to get started, here are some things to try:
In any file in your repository, run |:Gedit| HEAD. Press <CR> to jump to the
current branch. Press <CR> again to jump to the top most commit. Keep using
<CR> to explore parent commits, trees, and blobs. Use C in a tree or blob to
get back to the commit.
Edit a file in the work tree and make some changes. Use |:Gdiff| to open up
the indexed version. Use |do| and |dp| on various hunks to bring the files in
sync, or use |:Gread| to pull in all changes. Write the indexed version to
stage the file.
Run |:Gstatus| to check your repository's status. Use "-" to stage and reset
files and "p" to add/reset --patch them. Invoke |:Gcommit| to commit your
changes.
Run |:Gblame| in a work tree file to see a blame in a vertical split. Press
<CR> on any line to reopen and reblame that file as it stood in that commit.
Press o or O on any line to inspect that commit in a split or a tab.
Run |:Ggrep| to search the work tree or history. Run |:Gmove| to rename a
file. Run |:Gremove| to delete a file.
COMMANDS *fugitive-commands*
These commands are local to the buffers in which they work (generally, buffers
that are part of Git repositories).
*fugitive-:Git*
:Git [args] Run an arbitrary git command. Similar to :!git [args]
but chdir to the repository tree first.
*fugitive-:Gcd*
:Gcd [directory] |:cd| relative to the repository.
*fugitive-:Glcd*
:Glcd [directory] |:lcd| relative to the repository.
*fugitive-:Gstatus*
:Gstatus Bring up the output of git-status in the preview
window. In addition to standard motions, you can
use <C-N> and <C-P> to jump from filename to
filename. Press C to invoke |:Gcommit|. Press D to
|:Gdiff| the file on the cursor line, or ds to
|:Gsdiff|. Press - to stage or unstage the file on
the cursor line. Press p to do so on a per hunk basis
(--patch). All of D, -, and p have a different,
sensible (and hopefully intuitive) behavior when
invoked on a heading rather than a file name.
*fugitive-:Gcommit*
:Gcommit [args] A wrapper around git-commit. If there is nothing
to commit, |:Gstatus| is called instead. Unless the
arguments given would skip the invocation of an editor
(e.g., -m), a split window will be used to obtain a
commit message. Write and close that window (:wq or
|:Gwrite|) to finish the commit. Unlike when running
the actual git-commit command, it is possible (but
unadvisable) to muck with the index with commands like
git-add and git-reset while a commit message is
pending.
*fugitive-:Ggrep*
:Ggrep [args] |:grep| with git-grep as 'grepprg'.
*fugitive-:Glog*
:Glog [args] Load all previous revisions of the current file into
the quickfix list. Additional git-log arguments can
be given (for example, --reverse). If "--" appears as
an argument, no file specific filtering is done, and
commits are loaded into the quickfix list.
*fugitive-:Gedit* *fugitive-:Ge*
:Gedit [revision] |:edit| a |fugitive-revision|.
*fugitive-:Gsplit*
:Gsplit [revision] |:split| a |fugitive-revision|.
*fugitive-:Gvsplit*
:Gvsplit [revision] |:vsplit| a |fugitive-revision|.
*fugitive-:Gtabedit*
:Gtabedit [revision] |:tabedit| a |fugitive-revision|
*fugitive-:Gpedit*
:Gpedit [revision] |:pedit| a |fugitive-revision|
*fugitive-:Gread*
:Gread [revision] Empty the buffer and |:read| a |fugitive-revision|.
When the argument is omitted, this is similar to
git-checkout on a work tree file or git-add on a stage
file, but without writing anything to disk.
:{range}Gread [revision]
|:read| in a |fugitive-revision| after {range}.
*fugitive-:Gwrite*
:Gwrite Write to the current file's path and stage the results.
When run in a work tree file, it is effectively git
add. Elsewhere, it is effectively git-checkout. A
great deal of effort is expended to behave sensibly
when the work tree or index version of the file is
open in another buffer.
:Gwrite {path} You can give |:Gwrite| an explicit path of where in
the work tree to write. You can also give a path like
:0:foo.txt or even :0 to write to just that stage in
the index.
*fugitive-:Gwq*
:Gwq [path] Like |:Gwrite| followed by |:quit| if the write
succeeded.
:Gwq! [path] Like |:Gwrite|! followed by |:quit|! if the write
succeeded.
*fugitive-:Gdiff*
:Gdiff [revision] Perform a |vimdiff| against the current file in the
given revision. With no argument, the version in the
index is used (which means a three-way diff during a
merge conflict, making it a git-mergetool
alternative). The newer of the two files is placed
to the right. Use |do| and |dp| and write to the
index file to simulate "git add --patch".
*fugitive-:Gsdiff*
:Gsdiff [revision] Like |:Gdiff|, but split horizontally.
*fugitive-:Gvdiff*
:Gvdiff [revision] Identical to |:Gdiff|. For symmetry with |:Gsdiff|.
*fugitive-:Gmove*
:Gmove {destination} Wrapper around git-mv that renames the buffer
afterward. The destination is relative to the current
directory except when started with a /, in which case
it is relative to the work tree. Add a ! to pass -f.
*fugitive-:Gremove*
:Gremove Wrapper around git-rm that deletes the buffer
afterward. When invoked in an index file, --cached is
passed. Add a ! to pass -f and forcefully discard the
buffer.
*fugitive-:Gblame*
:Gblame [flags] Run git-blame on the file and open the results in a
scroll bound vertical split. Press enter on a line to
reblame the file as it was in that commit. You can
give any of ltwfsMC as flags and they will be passed
along to git-blame.
:[range]Gblame [flags] Run git-blame on the given range.
*fugitive-:Gbrowse*
:[range]Gbrowse If the remote for the current branch is on GitHub,
open the current file, blob, tree, commit, or tag
(with git-web--browse) on GitHub. Otherwise, open the
current file, blob, tree, commit, or tag in
git-instaweb (if you have issues, verify you can run
"git instaweb" from a terminal). If a range is given,
it is appropriately appended to the URL as an anchor.
:[range]Gbrowse! Like :Gbrowse, but put the URL on the clipboard rather
than opening it.
:[range]Gbrowse {revision}
Like :Gbrowse, but for a given |fugitive-revision|. A
useful value here is -, which ties the URL to the
latest commit rather than a volatile branch.
:[range]Gbrowse [...]@{remote}
Force using the given remote rather than the remote
for the current branch. The remote is used to
determine which GitHub repository to link to.
MAPPINGS *fugitive-mappings*
These maps are available in Git objects.
*fugitive-<CR>*
<CR> Jump to the revision under the cursor.
*fugitive-o*
o Jump to the revision under the cursor in a new split.
*fugitive-O*
O Jump to the revision under the cursor in a new tab.
*fugitive-~*
~ Go to the current file in the [count]th first
ancestor.
*fugitive-P*
P Go to the current file in the [count]th parent.
*fugitive-C*
C Go to the commit containing the current file.
*fugitive-a*
a Show the current tag, commit, or tree in an alternate
format.
SPECIFYING REVISIONS *fugitive-revision*
Fugitive revisions are similar to Git revisions as defined in the "SPECIFYING
REVISIONS" section in the git-rev-parse man page. For commands that accept an
optional revision, the default is the file in the index for work tree files
and the work tree file for everything else. Example revisions follow.
Revision Meaning ~
HEAD .git/HEAD
master .git/refs/heads/master
HEAD^{} The commit referenced by HEAD
HEAD^ The parent of the commit referenced by HEAD
HEAD: The tree referenced by HEAD
/HEAD The file named HEAD in the work tree
Makefile The file named Makefile in the work tree
HEAD^:Makefile The file named Makefile in the parent of HEAD
:Makefile The file named Makefile in the index (writable)
- The current file in HEAD
^ The current file in the previous commit
~3 The current file 3 commits ago
: .git/index (Same as |:Gstatus|)
:0 The current file in the index
:1 The current file's common ancestor during a conflict
:2 The current file in the target branch during a conflict
:3 The current file in the merged branch during a conflict
:/foo The most recent commit with "foo" in the message
STATUSLINE *fugitive-statusline*
*fugitive#statusline()*
Add %{fugitive#statusline()} to your statusline to get an indicator including
the current branch and the currently edited file's commit. If you don't have
a statusline, this one matches the default when 'ruler' is set:
>
set statusline=%<%f\ %h%m%r%{fugitive#statusline()}%=%-14.(%l,%c%V%)\ %P
<
ABOUT *fugitive-about*
Grab the latest version or report a bug on GitHub:
http://github.com/tpope/vim-fugitive
vim:tw=78:et:ft=help:norl:

1501
.vim/doc/taglist.txt Normal file

File diff suppressed because it is too large Load Diff

4
.vim/ftdetect/vala.vim Normal file
View File

@ -0,0 +1,4 @@
au BufRead *.vala set efm=%f:%l.%c-%[%^:]%#:\ %t%[%^:]%#:\ %m
au BufRead *.vapi set efm=%f:%l.%c-%[%^:]%#:\ %t%[%^:]%#:\ %m
au BufRead,BufNewFile *.vala setf vala
au BufRead,BufNewFile *.vapi setf vala

15
.vim/indent/vala.vim Normal file
View File

@ -0,0 +1,15 @@
" Vim indent file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2005 Mar 27
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
" C indenting is built-in, thus this is very simple
setlocal cindent
let b:undo_indent = "setl cin<"

View File

@ -0,0 +1,41 @@
" ============================================================================
" File: exec_menuitem.vim
" Description: plugin for NERD Tree that provides an execute file menu item
" Maintainer: Martin Grenfell <martin.grenfell at gmail dot com>
" Last Change: 22 July, 2009
" License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
" ============================================================================
if exists("g:loaded_nerdtree_exec_menuitem")
finish
endif
let g:loaded_nerdtree_exec_menuitem = 1
call NERDTreeAddMenuItem({
\ 'text': '(!)Execute file',
\ 'shortcut': '!',
\ 'callback': 'NERDTreeExecFile',
\ 'isActiveCallback': 'NERDTreeExecFileActive' })
function! NERDTreeExecFileActive()
let node = g:NERDTreeFileNode.GetSelected()
return !node.path.isDirectory && node.path.isExecutable
endfunction
function! NERDTreeExecFile()
let treenode = g:NERDTreeFileNode.GetSelected()
echo "==========================================================\n"
echo "Complete the command to execute (add arguments etc):\n"
let cmd = treenode.path.str({'escape': 1})
let cmd = input(':!', cmd . ' ')
if cmd != ''
exec ':!' . cmd
else
echo "Aborted"
endif
endfunction

View File

@ -0,0 +1,224 @@
" ============================================================================
" File: fs_menu.vim
" Description: plugin for the NERD Tree that provides a file system menu
" Maintainer: Martin Grenfell <martin.grenfell at gmail dot com>
" Last Change: 17 July, 2009
" License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
" ============================================================================
if exists("g:loaded_nerdtree_fs_menu")
finish
endif
let g:loaded_nerdtree_fs_menu = 1
call NERDTreeAddMenuItem({'text': '(a)dd a childnode', 'shortcut': 'a', 'callback': 'NERDTreeAddNode'})
call NERDTreeAddMenuItem({'text': '(m)ove the current node', 'shortcut': 'm', 'callback': 'NERDTreeMoveNode'})
call NERDTreeAddMenuItem({'text': '(d)elete the current node', 'shortcut': 'd', 'callback': 'NERDTreeDeleteNode'})
if has("gui_mac") || has("gui_macvim")
call NERDTreeAddMenuItem({'text': '(r)eveal in Finder the current node', 'shortcut': 'r', 'callback': 'NERDTreeRevealInFinder'})
call NERDTreeAddMenuItem({'text': '(o)pen the current node with system editor', 'shortcut': 'o', 'callback': 'NERDTreeExecuteFile'})
call NERDTreeAddMenuItem({'text': '(q)uicklook the current node', 'shortcut': 'q', 'callback': 'NERDTreeQuickLook'})
endif
if g:NERDTreePath.CopyingSupported()
call NERDTreeAddMenuItem({'text': '(c)copy the current node', 'shortcut': 'c', 'callback': 'NERDTreeCopyNode'})
endif
"FUNCTION: s:echo(msg){{{1
function! s:echo(msg)
redraw
echomsg "NERDTree: " . a:msg
endfunction
"FUNCTION: s:echoWarning(msg){{{1
function! s:echoWarning(msg)
echohl warningmsg
call s:echo(a:msg)
echohl normal
endfunction
"FUNCTION: s:promptToDelBuffer(bufnum, msg){{{1
"prints out the given msg and, if the user responds by pushing 'y' then the
"buffer with the given bufnum is deleted
"
"Args:
"bufnum: the buffer that may be deleted
"msg: a message that will be echoed to the user asking them if they wish to
" del the buffer
function! s:promptToDelBuffer(bufnum, msg)
echo a:msg
if nr2char(getchar()) ==# 'y'
exec "silent bdelete! " . a:bufnum
endif
endfunction
"FUNCTION: NERDTreeAddNode(){{{1
function! NERDTreeAddNode()
let curDirNode = g:NERDTreeDirNode.GetSelected()
let newNodeName = input("Add a childnode\n".
\ "==========================================================\n".
\ "Enter the dir/file name to be created. Dirs end with a '/'\n" .
\ "", curDirNode.path.str() . g:NERDTreePath.Slash(), "file")
if newNodeName ==# ''
call s:echo("Node Creation Aborted.")
return
endif
try
let newPath = g:NERDTreePath.Create(newNodeName)
let parentNode = b:NERDTreeRoot.findNode(newPath.getParent())
let newTreeNode = g:NERDTreeFileNode.New(newPath)
if parentNode.isOpen || !empty(parentNode.children)
call parentNode.addChild(newTreeNode, 1)
call NERDTreeRender()
call newTreeNode.putCursorHere(1, 0)
endif
catch /^NERDTree/
call s:echoWarning("Node Not Created.")
endtry
endfunction
"FUNCTION: NERDTreeMoveNode(){{{1
function! NERDTreeMoveNode()
let curNode = g:NERDTreeFileNode.GetSelected()
let newNodePath = input("Rename the current node\n" .
\ "==========================================================\n" .
\ "Enter the new path for the node: \n" .
\ "", curNode.path.str(), "file")
if newNodePath ==# ''
call s:echo("Node Renaming Aborted.")
return
endif
try
let bufnum = bufnr(curNode.path.str())
call curNode.rename(newNodePath)
call NERDTreeRender()
"if the node is open in a buffer, ask the user if they want to
"close that buffer
if bufnum != -1
let prompt = "\nNode renamed.\n\nThe old file is open in buffer ". bufnum . (bufwinnr(bufnum) ==# -1 ? " (hidden)" : "") .". Delete this buffer? (yN)"
call s:promptToDelBuffer(bufnum, prompt)
endif
call curNode.putCursorHere(1, 0)
redraw
catch /^NERDTree/
call s:echoWarning("Node Not Renamed.")
endtry
endfunction
" FUNCTION: NERDTreeDeleteNode() {{{1
function! NERDTreeDeleteNode()
let currentNode = g:NERDTreeFileNode.GetSelected()
let confirmed = 0
if currentNode.path.isDirectory
let choice =input("Delete the current node\n" .
\ "==========================================================\n" .
\ "STOP! To delete this entire directory, type 'yes'\n" .
\ "" . currentNode.path.str() . ": ")
let confirmed = choice ==# 'yes'
else
echo "Delete the current node\n" .
\ "==========================================================\n".
\ "Are you sure you wish to delete the node:\n" .
\ "" . currentNode.path.str() . " (yN):"
let choice = nr2char(getchar())
let confirmed = choice ==# 'y'
endif
if confirmed
try
call currentNode.delete()
call NERDTreeRender()
"if the node is open in a buffer, ask the user if they want to
"close that buffer
let bufnum = bufnr(currentNode.path.str())
if buflisted(bufnum)
let prompt = "\nNode deleted.\n\nThe file is open in buffer ". bufnum . (bufwinnr(bufnum) ==# -1 ? " (hidden)" : "") .". Delete this buffer? (yN)"
call s:promptToDelBuffer(bufnum, prompt)
endif
redraw
catch /^NERDTree/
call s:echoWarning("Could not remove node")
endtry
else
call s:echo("delete aborted")
endif
endfunction
" FUNCTION: NERDTreeCopyNode() {{{1
function! NERDTreeCopyNode()
let currentNode = g:NERDTreeFileNode.GetSelected()
let newNodePath = input("Copy the current node\n" .
\ "==========================================================\n" .
\ "Enter the new path to copy the node to: \n" .
\ "", currentNode.path.str(), "file")
if newNodePath != ""
"strip trailing slash
let newNodePath = substitute(newNodePath, '\/$', '', '')
let confirmed = 1
if currentNode.path.copyingWillOverwrite(newNodePath)
call s:echo("Warning: copying may overwrite files! Continue? (yN)")
let choice = nr2char(getchar())
let confirmed = choice ==# 'y'
endif
if confirmed
try
let newNode = currentNode.copy(newNodePath)
if !empty(newNode)
call NERDTreeRender()
call newNode.putCursorHere(0, 0)
endif
catch /^NERDTree/
call s:echoWarning("Could not copy node")
endtry
endif
else
call s:echo("Copy aborted.")
endif
redraw
endfunction
function! NERDTreeQuickLook()
let treenode = g:NERDTreeFileNode.GetSelected()
if treenode != {}
call system("qlmanage -p 2>/dev/null '" . treenode.path.str() . "'")
endif
endfunction
function! NERDTreeRevealInFinder()
let treenode = g:NERDTreeFileNode.GetSelected()
if treenode != {}
let x = system("open -R '" . treenode.path.str() . "'")
endif
endfunction
function! NERDTreeExecuteFile()
let treenode = g:NERDTreeFileNode.GetSelected()
if treenode != {}
let x = system("open '" . treenode.path.str() . "'")
endif
endfunction
" vim: set sw=4 sts=4 et fdm=marker:

4017
.vim/plugin/NERD_tree.vim Normal file

File diff suppressed because it is too large Load Diff

840
.vim/plugin/a.vim Normal file
View File

@ -0,0 +1,840 @@
" Copyright (c) 1998-2006
" Michael Sharpe <feline@irendi.com>
"
" We grant permission to use, copy modify, distribute, and sell this
" software for any purpose without fee, provided that the above copyright
" notice and this text are not removed. We make no guarantee about the
" suitability of this software for any purpose and we are not liable
" for any damages resulting from its use. Further, we are under no
" obligation to maintain or extend this software. It is provided on an
" "as is" basis without any expressed or implied warranty.
" Directory & regex enhancements added by Bindu Wavell who is well known on
" vim.sf.net
"
" Patch for spaces in files/directories from Nathan Stien (also reported by
" Soeren Sonnenburg)
" Do not load a.vim if is has already been loaded.
if exists("loaded_alternateFile")
finish
endif
if (v:progname == "ex")
finish
endif
let loaded_alternateFile = 1
let alternateExtensionsDict = {}
" setup the default set of alternate extensions. The user can override in thier
" .vimrc if the defaults are not suitable. To override in a .vimrc simply set a
" g:alternateExtensions_<EXT> variable to a comma separated list of alternates,
" where <EXT> is the extension to map.
" E.g. let g:alternateExtensions_CPP = "inc,h,H,HPP,hpp"
" let g:alternateExtensions_{'aspx.cs'} = "aspx"
" This variable will be increased when an extension with greater number of dots
" is added by the AddAlternateExtensionMapping call.
let s:maxDotsInExtension = 1
" Function : AddAlternateExtensionMapping (PRIVATE)
" Purpose : simple helper function to add the default alternate extension
" mappings.
" Args : extension -- the extension to map
" alternates -- comma separated list of alternates extensions
" Returns : nothing
" Author : Michael Sharpe <feline@irendi.com>
function! <SID>AddAlternateExtensionMapping(extension, alternates)
" This code does not actually work for variables like foo{'a.b.c.d.e'}
"let varName = "g:alternateExtensions_" . a:extension
"if (!exists(varName))
" let g:alternateExtensions_{a:extension} = a:alternates
"endif
" This code handles extensions which contains a dot. exists() fails with
" such names.
"let v:errmsg = ""
" FIXME this line causes ex to return 1 instead of 0 for some reason??
"silent! echo g:alternateExtensions_{a:extension}
"if (v:errmsg != "")
"let g:alternateExtensions_{a:extension} = a:alternates
"endif
let g:alternateExtensionsDict[a:extension] = a:alternates
let dotsNumber = strlen(substitute(a:extension, "[^.]", "", "g"))
if s:maxDotsInExtension < dotsNumber
let s:maxDotsInExtension = dotsNumber
endif
endfunction
" Add all the default extensions
" Mappings for C and C++
call <SID>AddAlternateExtensionMapping('h',"c,cpp,cxx,cc,CC")
call <SID>AddAlternateExtensionMapping('H',"C,CPP,CXX,CC")
call <SID>AddAlternateExtensionMapping('hpp',"cpp,c")
call <SID>AddAlternateExtensionMapping('HPP',"CPP,C")
call <SID>AddAlternateExtensionMapping('c',"h")
call <SID>AddAlternateExtensionMapping('C',"H")
call <SID>AddAlternateExtensionMapping('cpp',"h,hpp")
call <SID>AddAlternateExtensionMapping('CPP',"H,HPP")
call <SID>AddAlternateExtensionMapping('cc',"h")
call <SID>AddAlternateExtensionMapping('CC',"H,h")
call <SID>AddAlternateExtensionMapping('cxx',"h")
call <SID>AddAlternateExtensionMapping('CXX',"H")
" Mappings for PSL7
call <SID>AddAlternateExtensionMapping('psl',"ph")
call <SID>AddAlternateExtensionMapping('ph',"psl")
" Mappings for ADA
call <SID>AddAlternateExtensionMapping('adb',"ads")
call <SID>AddAlternateExtensionMapping('ads',"adb")
" Mappings for lex and yacc files
call <SID>AddAlternateExtensionMapping('l',"y,yacc,ypp")
call <SID>AddAlternateExtensionMapping('lex',"yacc,y,ypp")
call <SID>AddAlternateExtensionMapping('lpp',"ypp,y,yacc")
call <SID>AddAlternateExtensionMapping('y',"l,lex,lpp")
call <SID>AddAlternateExtensionMapping('yacc',"lex,l,lpp")
call <SID>AddAlternateExtensionMapping('ypp',"lpp,l,lex")
" Mappings for OCaml
call <SID>AddAlternateExtensionMapping('ml',"mli")
call <SID>AddAlternateExtensionMapping('mli',"ml")
" ASP stuff
call <SID>AddAlternateExtensionMapping('aspx.cs', 'aspx')
call <SID>AddAlternateExtensionMapping('aspx.vb', 'aspx')
call <SID>AddAlternateExtensionMapping('aspx', 'aspx.cs,aspx.vb')
" Setup default search path, unless the user has specified
" a path in their [._]vimrc.
if (!exists('g:alternateSearchPath'))
let g:alternateSearchPath = 'sfr:../source,sfr:../src,sfr:../include,sfr:../inc'
endif
" If this variable is true then a.vim will not alternate to a file/buffer which
" does not exist. E.g while editing a.c and the :A will not swtich to a.h
" unless it exists.
if (!exists('g:alternateNoDefaultAlternate'))
" by default a.vim will alternate to a file which does not exist
let g:alternateNoDefaultAlternate = 0
endif
" If this variable is true then a.vim will convert the alternate filename to a
" filename relative to the current working directory.
" Feature by Nathan Huizinga
if (!exists('g:alternateRelativeFiles'))
" by default a.vim will not convert the filename to one relative to the
" current working directory
let g:alternateRelativeFiles = 0
endif
" Function : GetNthItemFromList (PRIVATE)
" Purpose : Support reading items from a comma seperated list
" Used to iterate all the extensions in an extension spec
" Used to iterate all path prefixes
" Args : list -- the list (extension spec, file paths) to iterate
" n -- the extension to get
" Returns : the nth item (extension, path) from the list (extension
" spec), or "" for failure
" Author : Michael Sharpe <feline@irendi.com>
" History : Renamed from GetNthExtensionFromSpec to GetNthItemFromList
" to reflect a more generic use of this function. -- Bindu
function! <SID>GetNthItemFromList(list, n)
let itemStart = 0
let itemEnd = -1
let pos = 0
let item = ""
let i = 0
while (i != a:n)
let itemStart = itemEnd + 1
let itemEnd = match(a:list, ",", itemStart)
let i = i + 1
if (itemEnd == -1)
if (i == a:n)
let itemEnd = strlen(a:list)
endif
break
endif
endwhile
if (itemEnd != -1)
let item = strpart(a:list, itemStart, itemEnd - itemStart)
endif
return item
endfunction
" Function : ExpandAlternatePath (PRIVATE)
" Purpose : Expand path info. A path with a prefix of "wdr:" will be
" treated as relative to the working directory (i.e. the
" directory where vim was started.) A path prefix of "abs:" will
" be treated as absolute. No prefix or "sfr:" will result in the
" path being treated as relative to the source file (see sfPath
" argument).
"
" A prefix of "reg:" will treat the pathSpec as a regular
" expression substitution that is applied to the source file
" path. The format is:
"
" reg:<sep><pattern><sep><subst><sep><flag><sep>
"
" <sep> seperator character, we often use one of [/|%#]
" <pattern> is what you are looking for
" <subst> is the output pattern
" <flag> can be g for global replace or empty
"
" EXAMPLE: 'reg:/inc/src/g/' will replace every instance
" of 'inc' with 'src' in the source file path. It is possible
" to use match variables so you could do something like:
" 'reg:|src/\([^/]*\)|inc/\1||' (see 'help :substitute',
" 'help pattern' and 'help sub-replace-special' for more details
"
" NOTE: a.vim uses ',' (comma) internally so DON'T use it
" in your regular expressions or other pathSpecs unless you update
" the rest of the a.vim code to use some other seperator.
"
" Args : pathSpec -- path component (or substitution patterns)
" sfPath -- source file path
" Returns : a path that can be used by AlternateFile()
" Author : Bindu Wavell <bindu@wavell.net>
function! <SID>ExpandAlternatePath(pathSpec, sfPath)
let prfx = strpart(a:pathSpec, 0, 4)
if (prfx == "wdr:" || prfx == "abs:")
let path = strpart(a:pathSpec, 4)
elseif (prfx == "reg:")
let re = strpart(a:pathSpec, 4)
let sep = strpart(re, 0, 1)
let patend = match(re, sep, 1)
let pat = strpart(re, 1, patend - 1)
let subend = match(re, sep, patend + 1)
let sub = strpart(re, patend+1, subend - patend - 1)
let flag = strpart(re, strlen(re) - 2)
if (flag == sep)
let flag = ''
endif
let path = substitute(a:sfPath, pat, sub, flag)
"call confirm('PAT: [' . pat . '] SUB: [' . sub . ']')
"call confirm(a:sfPath . ' => ' . path)
else
let path = a:pathSpec
if (prfx == "sfr:")
let path = strpart(path, 4)
endif
let path = a:sfPath . "/" . path
endif
return path
endfunction
" Function : FindFileInSearchPath (PRIVATE)
" Purpose : Searches for a file in the search path list
" Args : filename -- name of the file to search for
" pathList -- the path list to search
" relPathBase -- the path which relative paths are expanded from
" Returns : An expanded filename if found, the empty string otherwise
" Author : Michael Sharpe (feline@irendi.com)
" History : inline code written by Bindu Wavell originally
function! <SID>FindFileInSearchPath(fileName, pathList, relPathBase)
let filepath = ""
let m = 1
let pathListLen = strlen(a:pathList)
if (pathListLen > 0)
while (1)
let pathSpec = <SID>GetNthItemFromList(a:pathList, m)
if (pathSpec != "")
let path = <SID>ExpandAlternatePath(pathSpec, a:relPathBase)
let fullname = path . "/" . a:fileName
let foundMatch = <SID>BufferOrFileExists(fullname)
if (foundMatch)
let filepath = fullname
break
endif
else
break
endif
let m = m + 1
endwhile
endif
return filepath
endfunction
" Function : FindFileInSearchPathEx (PRIVATE)
" Purpose : Searches for a file in the search path list
" Args : filename -- name of the file to search for
" pathList -- the path list to search
" relPathBase -- the path which relative paths are expanded from
" count -- find the count'th occurence of the file on the path
" Returns : An expanded filename if found, the empty string otherwise
" Author : Michael Sharpe (feline@irendi.com)
" History : Based on <SID>FindFileInSearchPath() but with extensions
function! <SID>FindFileInSearchPathEx(fileName, pathList, relPathBase, count)
let filepath = ""
let m = 1
let spath = ""
let pathListLen = strlen(a:pathList)
if (pathListLen > 0)
while (1)
let pathSpec = <SID>GetNthItemFromList(a:pathList, m)
if (pathSpec != "")
let path = <SID>ExpandAlternatePath(pathSpec, a:relPathBase)
if (spath != "")
let spath = spath . ','
endif
let spath = spath . path
else
break
endif
let m = m + 1
endwhile
endif
if (&path != "")
if (spath != "")
let spath = spath . ','
endif
let spath = spath . &path
endif
let filepath = findfile(a:fileName, spath, a:count)
return filepath
endfunction
" Function : EnumerateFilesByExtension (PRIVATE)
" Purpose : enumerates all files by a particular list of alternate extensions.
" Args : path -- path of a file (not including the file)
" baseName -- base name of the file to be expanded
" extension -- extension whose alternates are to be enumerated
" Returns : comma separated list of files with extensions
" Author : Michael Sharpe <feline@irendi.com>
function! EnumerateFilesByExtension(path, baseName, extension)
let enumeration = ""
let extSpec = ""
let v:errmsg = ""
silent! echo g:alternateExtensions_{a:extension}
if (v:errmsg == "")
let extSpec = g:alternateExtensions_{a:extension}
endif
if (extSpec == "")
if (has_key(g:alternateExtensionsDict, a:extension))
let extSpec = g:alternateExtensionsDict[a:extension]
endif
endif
if (extSpec != "")
let n = 1
let done = 0
while (!done)
let ext = <SID>GetNthItemFromList(extSpec, n)
if (ext != "")
if (a:path != "")
let newFilename = a:path . "/" . a:baseName . "." . ext
else
let newFilename = a:baseName . "." . ext
endif
if (enumeration == "")
let enumeration = newFilename
else
let enumeration = enumeration . "," . newFilename
endif
else
let done = 1
endif
let n = n + 1
endwhile
endif
return enumeration
endfunction
" Function : EnumerateFilesByExtensionInPath (PRIVATE)
" Purpose : enumerates all files by expanding the path list and the extension
" list.
" Args : baseName -- base name of the file
" extension -- extension whose alternates are to be enumerated
" pathList -- the list of paths to enumerate
" relPath -- the path of the current file for expansion of relative
" paths in the path list.
" Returns : A comma separated list of paths with extensions
" Author : Michael Sharpe <feline@irendi.com>
function! EnumerateFilesByExtensionInPath(baseName, extension, pathList, relPathBase)
let enumeration = ""
let filepath = ""
let m = 1
let pathListLen = strlen(a:pathList)
if (pathListLen > 0)
while (1)
let pathSpec = <SID>GetNthItemFromList(a:pathList, m)
if (pathSpec != "")
let path = <SID>ExpandAlternatePath(pathSpec, a:relPathBase)
let pe = EnumerateFilesByExtension(path, a:baseName, a:extension)
if (enumeration == "")
let enumeration = pe
else
let enumeration = enumeration . "," . pe
endif
else
break
endif
let m = m + 1
endwhile
endif
return enumeration
endfunction
" Function : DetermineExtension (PRIVATE)
" Purpose : Determines the extension of a filename based on the register
" alternate extension. This allow extension which contain dots to
" be considered. E.g. foo.aspx.cs to foo.aspx where an alternate
" exists for the aspx.cs extension. Note that this will only accept
" extensions which contain less than 5 dots. This is only
" implemented in this manner for simplicity...it is doubtful that
" this will be a restriction in non-contrived situations.
" Args : The path to the file to find the extension in
" Returns : The matched extension if any
" Author : Michael Sharpe (feline@irendi.com)
" History : idea from Tom-Erik Duestad
" Notes : there is some magic occuring here. The exists() function does not
" work well when the curly brace variable has dots in it. And why
" should it, dots are not valid in variable names. But the exists
" function is wierd too. Lets say foo_c does exist. Then
" exists("foo_c.e.f") will be true...even though the variable does
" not exist. However the curly brace variables do work when the
" variable has dots in it. E.g foo_{'c'} is different from
" foo_{'c.d.e'}...and foo_{'c'} is identical to foo_c and
" foo_{'c.d.e'} is identical to foo_c.d.e right? Yes in the current
" implementation of vim. To trick vim to test for existence of such
" variables echo the curly brace variable and look for an error
" message.
function! DetermineExtension(path)
let mods = ":t"
let i = 0
while i <= s:maxDotsInExtension
let mods = mods . ":e"
let extension = fnamemodify(a:path, mods)
if (has_key(g:alternateExtensionsDict, extension))
return extension
endif
let v:errmsg = ""
silent! echo g:alternateExtensions_{extension}
if (v:errmsg == "")
return extension
endif
let i = i + 1
endwhile
return ""
endfunction
" Function : AlternateFile (PUBLIC)
" Purpose : Opens a new buffer by looking at the extension of the current
" buffer and finding the corresponding file. E.g. foo.c <--> foo.h
" Args : accepts one argument. If present it used the argument as the new
" extension.
" Returns : nothing
" Author : Michael Sharpe <feline@irendi.com>
" History : + When an alternate can't be found in the same directory as the
" source file, a search path will be traversed looking for the
" alternates.
" + Moved some code into a separate function, minor optimization
" + rework to favor files in memory based on complete enumeration of
" all files extensions and paths
function! AlternateFile(splitWindow, ...)
let extension = DetermineExtension(expand("%:p"))
let baseName = substitute(expand("%:t"), "\." . extension . '$', "", "")
let currentPath = expand("%:p:h")
if (a:0 != 0)
let newFullname = currentPath . "/" . baseName . "." . a:1
call <SID>FindOrCreateBuffer(newFullname, a:splitWindow, 0)
else
let allfiles = ""
if (extension != "")
let allfiles1 = EnumerateFilesByExtension(currentPath, baseName, extension)
let allfiles2 = EnumerateFilesByExtensionInPath(baseName, extension, g:alternateSearchPath, currentPath)
if (allfiles1 != "")
if (allfiles2 != "")
let allfiles = allfiles1 . ',' . allfiles2
else
let allfiles = allfiles1
endif
else
let allfiles = allfiles2
endif
endif
if (allfiles != "")
let bestFile = ""
let bestScore = 0
let score = 0
let n = 1
let onefile = <SID>GetNthItemFromList(allfiles, n)
let bestFile = onefile
while (onefile != "" && score < 2)
let score = <SID>BufferOrFileExists(onefile)
if (score > bestScore)
let bestScore = score
let bestFile = onefile
endif
let n = n + 1
let onefile = <SID>GetNthItemFromList(allfiles, n)
endwhile
if (bestScore == 0 && g:alternateNoDefaultAlternate == 1)
echo "No existing alternate available"
else
call <SID>FindOrCreateBuffer(bestFile, a:splitWindow, 1)
let b:AlternateAllFiles = allfiles
endif
else
echo "No alternate file/buffer available"
endif
endif
endfunction
" Function : AlternateOpenFileUnderCursor (PUBLIC)
" Purpose : Opens file under the cursor
" Args : splitWindow -- indicates how to open the file
" Returns : Nothing
" Author : Michael Sharpe (feline@irendi.com) www.irendi.com
function! AlternateOpenFileUnderCursor(splitWindow,...)
let cursorFile = (a:0 > 0) ? a:1 : expand("<cfile>")
let currentPath = expand("%:p:h")
let openCount = 1
let fileName = <SID>FindFileInSearchPathEx(cursorFile, g:alternateSearchPath, currentPath, openCount)
if (fileName != "")
call <SID>FindOrCreateBuffer(fileName, a:splitWindow, 1)
let b:openCount = openCount
let b:cursorFile = cursorFile
let b:currentPath = currentPath
else
echo "Can't find file"
endif
endfunction
" Function : AlternateOpenNextFile (PUBLIC)
" Purpose : Opens the next file corresponding to the search which found the
" current file
" Args : bang -- indicates what to do if the current file has not been
" saved
" Returns : nothing
" Author : Michael Sharpe (feline@irendi.com) www.irendi.com
function! AlternateOpenNextFile(bang)
let cursorFile = ""
if (exists("b:cursorFile"))
let cursorFile = b:cursorFile
endif
let currentPath = ""
if (exists("b:currentPath"))
let currentPath = b:currentPath
endif
let openCount = 0
if (exists("b:openCount"))
let openCount = b:openCount + 1
endif
if (cursorFile != "" && currentPath != "" && openCount != 0)
let fileName = <SID>FindFileInSearchPathEx(cursorFile, g:alternateSearchPath, currentPath, openCount)
if (fileName != "")
call <SID>FindOrCreateBuffer(fileName, "n".a:bang, 0)
let b:openCount = openCount
let b:cursorFile = cursorFile
let b:currentPath = currentPath
else
let fileName = <SID>FindFileInSearchPathEx(cursorFile, g:alternateSearchPath, currentPath, 1)
if (fileName != "")
call <SID>FindOrCreateBuffer(fileName, "n".a:bang, 0)
let b:openCount = 1
let b:cursorFile = cursorFile
let b:currentPath = currentPath
else
echo "Can't find next file"
endif
endif
endif
endfunction
comm! -nargs=? -bang IH call AlternateOpenFileUnderCursor("n<bang>", <f-args>)
comm! -nargs=? -bang IHS call AlternateOpenFileUnderCursor("h<bang>", <f-args>)
comm! -nargs=? -bang IHV call AlternateOpenFileUnderCursor("v<bang>", <f-args>)
comm! -nargs=? -bang IHT call AlternateOpenFileUnderCursor("t<bang>", <f-args>)
comm! -nargs=? -bang IHN call AlternateOpenNextFile("<bang>")
imap <Leader>ih <ESC>:IHS<CR>
nmap <Leader>ih :IHS<CR>
imap <Leader>is <ESC>:IHS<CR>:A<CR>
nmap <Leader>is :IHS<CR>:A<CR>
imap <Leader>ihn <ESC>:IHN<CR>
nmap <Leader>ihn :IHN<CR>
"function! <SID>PrintList(theList)
" let n = 1
" let oneFile = <SID>GetNthItemFromList(a:theList, n)
" while (oneFile != "")
" let n = n + 1
" let oneFile = <SID>GetNthItemFromList(a:theList, n)
" endwhile
"endfunction
" Function : NextAlternate (PUBLIC)
" Purpose : Used to cycle through any other alternate file which existed on
" the search path.
" Args : bang (IN) - used to implement the AN vs AN! functionality
" Returns : nothing
" Author : Michael Sharpe <feline@irendi.com>
function! NextAlternate(bang)
if (exists('b:AlternateAllFiles'))
let currentFile = expand("%")
let n = 1
let onefile = <SID>GetNthItemFromList(b:AlternateAllFiles, n)
while (onefile != "" && !<SID>EqualFilePaths(fnamemodify(onefile,":p"), fnamemodify(currentFile,":p")))
let n = n + 1
let onefile = <SID>GetNthItemFromList(b:AlternateAllFiles, n)
endwhile
if (onefile != "")
let stop = n
let n = n + 1
let foundAlternate = 0
let nextAlternate = ""
while (n != stop)
let nextAlternate = <SID>GetNthItemFromList(b:AlternateAllFiles, n)
if (nextAlternate == "")
let n = 1
continue
endif
let n = n + 1
if (<SID>EqualFilePaths(fnamemodify(nextAlternate, ":p"), fnamemodify(currentFile, ":p")))
continue
endif
if (filereadable(nextAlternate))
" on cygwin filereadable("foo.H") returns true if "foo.h" exists
if (has("unix") && $WINDIR != "" && fnamemodify(nextAlternate, ":p") ==? fnamemodify(currentFile, ":p"))
continue
endif
let foundAlternate = 1
break
endif
endwhile
if (foundAlternate == 1)
let s:AlternateAllFiles = b:AlternateAllFiles
"silent! execute ":e".a:bang." " . nextAlternate
call <SID>FindOrCreateBuffer(nextAlternate, "n".a:bang, 0)
let b:AlternateAllFiles = s:AlternateAllFiles
else
echo "Only this alternate file exists"
endif
else
echo "Could not find current file in alternates list"
endif
else
echo "No other alternate files exist"
endif
endfunction
comm! -nargs=? -bang A call AlternateFile("n<bang>", <f-args>)
comm! -nargs=? -bang AS call AlternateFile("h<bang>", <f-args>)
comm! -nargs=? -bang AV call AlternateFile("v<bang>", <f-args>)
comm! -nargs=? -bang AT call AlternateFile("t<bang>", <f-args>)
comm! -nargs=? -bang AN call NextAlternate("<bang>")
" Function : BufferOrFileExists (PRIVATE)
" Purpose : determines if a buffer or a readable file exists
" Args : fileName (IN) - name of the file to check
" Returns : 2 if it exists in memory, 1 if it exists, 0 otherwise
" Author : Michael Sharpe <feline@irendi.com>
" History : Updated code to handle buffernames using just the
" filename and not the path.
function! <SID>BufferOrFileExists(fileName)
let result = 0
let lastBuffer = bufnr("$")
let i = 1
while i <= lastBuffer
if <SID>EqualFilePaths(expand("#".i.":p"), a:fileName)
let result = 2
break
endif
let i = i + 1
endwhile
if (!result)
let bufName = fnamemodify(a:fileName,":t")
let memBufName = bufname(bufName)
if (memBufName != "")
let memBufBasename = fnamemodify(memBufName, ":t")
if (bufName == memBufBasename)
let result = 2
endif
endif
if (!result)
let result = bufexists(bufName) || bufexists(a:fileName) || filereadable(a:fileName)
endif
endif
if (!result)
let result = filereadable(a:fileName)
endif
return result
endfunction
" Function : FindOrCreateBuffer (PRIVATE)
" Purpose : searches the buffer list (:ls) for the specified filename. If
" found, checks the window list for the buffer. If the buffer is in
" an already open window, it switches to the window. If the buffer
" was not in a window, it switches to that buffer. If the buffer did
" not exist, it creates it.
" Args : filename (IN) -- the name of the file
" doSplit (IN) -- indicates whether the window should be split
" ("v", "h", "n", "v!", "h!", "n!", "t", "t!")
" findSimilar (IN) -- indicate weather existing buffers should be
" prefered
" Returns : nothing
" Author : Michael Sharpe <feline@irendi.com>
" History : + bufname() was not working very well with the possibly strange
" paths that can abound with the search path so updated this
" slightly. -- Bindu
" + updated window switching code to make it more efficient -- Bindu
" Allow ! to be applied to buffer/split/editing commands for more
" vim/vi like consistency
" + implemented fix from Matt Perry
function! <SID>FindOrCreateBuffer(fileName, doSplit, findSimilar)
" Check to see if the buffer is already open before re-opening it.
let FILENAME = escape(a:fileName, ' ')
let bufNr = -1
let lastBuffer = bufnr("$")
let i = 1
if (a:findSimilar)
while i <= lastBuffer
if <SID>EqualFilePaths(expand("#".i.":p"), a:fileName)
let bufNr = i
break
endif
let i = i + 1
endwhile
if (bufNr == -1)
let bufName = bufname(a:fileName)
let bufFilename = fnamemodify(a:fileName,":t")
if (bufName == "")
let bufName = bufname(bufFilename)
endif
if (bufName != "")
let tail = fnamemodify(bufName, ":t")
if (tail != bufFilename)
let bufName = ""
endif
endif
if (bufName != "")
let bufNr = bufnr(bufName)
let FILENAME = bufName
endif
endif
endif
if (g:alternateRelativeFiles == 1)
let FILENAME = fnamemodify(FILENAME, ":p:.")
endif
let splitType = a:doSplit[0]
let bang = a:doSplit[1]
if (bufNr == -1)
" Buffer did not exist....create it
let v:errmsg=""
if (splitType == "h")
silent! execute ":split".bang." " . FILENAME
elseif (splitType == "v")
silent! execute ":vsplit".bang." " . FILENAME
elseif (splitType == "t")
silent! execute ":tab split".bang." " . FILENAME
else
silent! execute ":e".bang." " . FILENAME
endif
if (v:errmsg != "")
echo v:errmsg
endif
else
" Find the correct tab corresponding to the existing buffer
let tabNr = -1
" iterate tab pages
for i in range(tabpagenr('$'))
" get the list of buffers in the tab
let tabList = tabpagebuflist(i + 1)
let idx = 0
" iterate each buffer in the list
while idx < len(tabList)
" if it matches the buffer we are looking for...
if (tabList[idx] == bufNr)
" ... save the number
let tabNr = i + 1
break
endif
let idx = idx + 1
endwhile
if (tabNr != -1)
break
endif
endfor
" switch the the tab containing the buffer
if (tabNr != -1)
execute "tabn ".tabNr
endif
" Buffer was already open......check to see if it is in a window
let bufWindow = bufwinnr(bufNr)
if (bufWindow == -1)
" Buffer was not in a window so open one
let v:errmsg=""
if (splitType == "h")
silent! execute ":sbuffer".bang." " . FILENAME
elseif (splitType == "v")
silent! execute ":vert sbuffer " . FILENAME
elseif (splitType == "t")
silent! execute ":tab sbuffer " . FILENAME
else
silent! execute ":buffer".bang." " . FILENAME
endif
if (v:errmsg != "")
echo v:errmsg
endif
else
" Buffer is already in a window so switch to the window
execute bufWindow."wincmd w"
if (bufWindow != winnr())
" something wierd happened...open the buffer
let v:errmsg=""
if (splitType == "h")
silent! execute ":split".bang." " . FILENAME
elseif (splitType == "v")
silent! execute ":vsplit".bang." " . FILENAME
elseif (splitType == "t")
silent! execute ":tab split".bang." " . FILENAME
else
silent! execute ":e".bang." " . FILENAME
endif
if (v:errmsg != "")
echo v:errmsg
endif
endif
endif
endif
endfunction
" Function : EqualFilePaths (PRIVATE)
" Purpose : Compares two paths. Do simple string comparison anywhere but on
" Windows. On Windows take into account that file paths could differ
" in usage of separators and the fact that case does not matter.
" "c:\WINDOWS" is the same path as "c:/windows". has("win32unix") Vim
" version does not count as one having Windows path rules.
" Args : path1 (IN) -- first path
" path2 (IN) -- second path
" Returns : 1 if path1 is equal to path2, 0 otherwise.
" Author : Ilya Bobir <ilya@po4ta.com>
function! <SID>EqualFilePaths(path1, path2)
if has("win16") || has("win32") || has("win64") || has("win95")
return substitute(a:path1, "\/", "\\", "g") ==? substitute(a:path2, "\/", "\\", "g")
else
return a:path1 == a:path2
endif
endfunction

165
.vim/plugin/cscope_maps.vim Normal file
View File

@ -0,0 +1,165 @@
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" CSCOPE settings for vim
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"
" This file contains some boilerplate settings for vim's cscope interface,
" plus some keyboard mappings that I've found useful.
"
" USAGE:
" -- vim 6: Stick this file in your ~/.vim/plugin directory (or in a
" 'plugin' directory in some other directory that is in your
" 'runtimepath'.
"
" -- vim 5: Stick this file somewhere and 'source cscope.vim' it from
" your ~/.vimrc file (or cut and paste it into your .vimrc).
"
" NOTE:
" These key maps use multiple keystrokes (2 or 3 keys). If you find that vim
" keeps timing you out before you can complete them, try changing your timeout
" settings, as explained below.
"
" Happy cscoping,
"
" Jason Duell jduell@alumni.princeton.edu 2002/3/7
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" This tests to see if vim was configured with the '--enable-cscope' option
" when it was compiled. If it wasn't, time to recompile vim...
if has("cscope")
""""""""""""" Standard cscope/vim boilerplate
" use both cscope and ctag for 'ctrl-]', ':ta', and 'vim -t'
set cscopetag
" check cscope for definition of a symbol before checking ctags: set to 1
" if you want the reverse search order.
set csto=0
" add any cscope database in current directory
if filereadable("cscope.out")
cs add cscope.out
" else add the database pointed to by environment variable
elseif $CSCOPE_DB != ""
cs add $CSCOPE_DB
endif
" show msg when any other cscope db added
set cscopeverbose
""""""""""""" My cscope/vim key mappings
"
" The following maps all invoke one of the following cscope search types:
"
" 's' symbol: find all references to the token under cursor
" 'g' global: find global definition(s) of the token under cursor
" 'c' calls: find all calls to the function name under cursor
" 't' text: find all instances of the text under cursor
" 'e' egrep: egrep search for the word under cursor
" 'f' file: open the filename under cursor
" 'i' includes: find files that include the filename under cursor
" 'd' called: find functions that function under cursor calls
"
" Below are three sets of the maps: one set that just jumps to your
" search result, one that splits the existing vim window horizontally and
" diplays your search result in the new window, and one that does the same
" thing, but does a vertical split instead (vim 6 only).
"
" I've used CTRL-\ and CTRL-@ as the starting keys for these maps, as it's
" unlikely that you need their default mappings (CTRL-\'s default use is
" as part of CTRL-\ CTRL-N typemap, which basically just does the same
" thing as hitting 'escape': CTRL-@ doesn't seem to have any default use).
" If you don't like using 'CTRL-@' or CTRL-\, , you can change some or all
" of these maps to use other keys. One likely candidate is 'CTRL-_'
" (which also maps to CTRL-/, which is easier to type). By default it is
" used to switch between Hebrew and English keyboard mode.
"
" All of the maps involving the <cfile> macro use '^<cfile>$': this is so
" that searches over '#include <time.h>" return only references to
" 'time.h', and not 'sys/time.h', etc. (by default cscope will return all
" files that contain 'time.h' as part of their name).
" To do the first type of search, hit 'CTRL-\', followed by one of the
" cscope search types above (s,g,c,t,e,f,i,d). The result of your cscope
" search will be displayed in the current window. You can use CTRL-T to
" go back to where you were before the search.
"
nmap <C-\>s :cs find s <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>g :cs find g <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>c :cs find c <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>t :cs find t <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>e :cs find e <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>f :cs find f <C-R>=expand("<cfile>")<CR><CR>
nmap <C-\>i :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
nmap <C-\>d :cs find d <C-R>=expand("<cword>")<CR><CR>
" Using 'CTRL-spacebar' (intepreted as CTRL-@ by vim) then a search type
" makes the vim window split horizontally, with search result displayed in
" the new window.
"
" (Note: earlier versions of vim may not have the :scs command, but it
" can be simulated roughly via:
" nmap <C-@>s <C-W><C-S> :cs find s <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>s :scs find s <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>g :scs find g <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>c :scs find c <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>t :scs find t <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>e :scs find e <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>f :scs find f <C-R>=expand("<cfile>")<CR><CR>
nmap <C-@>i :scs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
nmap <C-@>d :scs find d <C-R>=expand("<cword>")<CR><CR>
" Hitting CTRL-space *twice* before the search type does a vertical
" split instead of a horizontal one (vim 6 and up only)
"
" (Note: you may wish to put a 'set splitright' in your .vimrc
" if you prefer the new window on the right instead of the left
nmap <C-@><C-@>s :vert scs find s <C-R>=expand("<cword>")<CR><CR>
nmap <C-@><C-@>g :vert scs find g <C-R>=expand("<cword>")<CR><CR>
nmap <C-@><C-@>c :vert scs find c <C-R>=expand("<cword>")<CR><CR>
nmap <C-@><C-@>t :vert scs find t <C-R>=expand("<cword>")<CR><CR>
nmap <C-@><C-@>e :vert scs find e <C-R>=expand("<cword>")<CR><CR>
nmap <C-@><C-@>f :vert scs find f <C-R>=expand("<cfile>")<CR><CR>
nmap <C-@><C-@>i :vert scs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
nmap <C-@><C-@>d :vert scs find d <C-R>=expand("<cword>")<CR><CR>
""""""""""""" key map timeouts
"
" By default Vim will only wait 1 second for each keystroke in a mapping.
" You may find that too short with the above typemaps. If so, you should
" either turn off mapping timeouts via 'notimeout'.
"
"set notimeout
"
" Or, you can keep timeouts, by uncommenting the timeoutlen line below,
" with your own personal favorite value (in milliseconds):
"
"set timeoutlen=4000
"
" Either way, since mapping timeout settings by default also set the
" timeouts for multicharacter 'keys codes' (like <F1>), you should also
" set ttimeout and ttimeoutlen: otherwise, you will experience strange
" delays as vim waits for a keystroke after you hit ESC (it will be
" waiting to see if the ESC is actually part of a key code like <F1>).
"
"set ttimeout
"
" personally, I find a tenth of a second to work well for key code
" timeouts. If you experience problems and have a slow terminal or network
" connection, set it higher. If you don't set ttimeoutlen, the value for
" timeoutlent (default: 1000 = 1 second, which is sluggish) is used.
"
"set ttimeoutlen=100
endif

158
.vim/plugin/fuf.vim Normal file
View File

@ -0,0 +1,158 @@
"=============================================================================
" Copyright (c) 2007-2010 Takeshi NISHIDA
"
" GetLatestVimScripts: 1984 1 :AutoInstall: FuzzyFinder
"=============================================================================
" LOAD GUARD {{{1
try
if !l9#guardScriptLoading(expand('<sfile>:p'), 702, 101, [])
finish
endif
catch /E117/
echoerr '***** L9 library must be installed! *****'
finish
endtry
" }}}1
"=============================================================================
" LOCAL FUNCTIONS {{{1
"
function s:initialize()
"---------------------------------------------------------------------------
call l9#defineVariableDefault('g:fuf_modesDisable' , [ 'mrufile', 'mrucmd', ])
call l9#defineVariableDefault('g:fuf_keyOpen' , '<CR>')
call l9#defineVariableDefault('g:fuf_keyOpenSplit' , '<C-j>')
call l9#defineVariableDefault('g:fuf_keyOpenVsplit' , '<C-k>')
call l9#defineVariableDefault('g:fuf_keyOpenTabpage' , '<C-l>')
call l9#defineVariableDefault('g:fuf_keyPreview' , '<C-@>')
call l9#defineVariableDefault('g:fuf_keyNextMode' , '<C-t>')
call l9#defineVariableDefault('g:fuf_keyPrevMode' , '<C-y>')
call l9#defineVariableDefault('g:fuf_keyPrevPattern' , '<C-s>')
call l9#defineVariableDefault('g:fuf_keyNextPattern' , '<C-_>')
call l9#defineVariableDefault('g:fuf_keySwitchMatching', '<C-\><C-\>')
call l9#defineVariableDefault('g:fuf_dataDir' , '~/.vim-fuf-data')
call l9#defineVariableDefault('g:fuf_abbrevMap' , {})
call l9#defineVariableDefault('g:fuf_patternSeparator' , ';')
call l9#defineVariableDefault('g:fuf_promptHighlight' , 'Question')
call l9#defineVariableDefault('g:fuf_ignoreCase' , 1)
call l9#defineVariableDefault('g:fuf_splitPathMatching', 1)
call l9#defineVariableDefault('g:fuf_fuzzyRefining' , 0)
call l9#defineVariableDefault('g:fuf_smartBs' , 1)
call l9#defineVariableDefault('g:fuf_reuseWindow' , 1)
call l9#defineVariableDefault('g:fuf_timeFormat' , '(%Y-%m-%d %H:%M:%S)')
call l9#defineVariableDefault('g:fuf_learningLimit' , 100)
call l9#defineVariableDefault('g:fuf_enumeratingLimit' , 50)
call l9#defineVariableDefault('g:fuf_maxMenuWidth' , 78)
call l9#defineVariableDefault('g:fuf_previewHeight' , 0)
call l9#defineVariableDefault('g:fuf_autoPreview' , 0)
call l9#defineVariableDefault('g:fuf_useMigemo' , 0)
"---------------------------------------------------------------------------
call l9#defineVariableDefault('g:fuf_buffer_prompt' , '>Buffer[]>')
call l9#defineVariableDefault('g:fuf_buffer_switchOrder', 10)
call l9#defineVariableDefault('g:fuf_buffer_mruOrder' , 1)
call l9#defineVariableDefault('g:fuf_buffer_keyDelete' , '<C-]>')
"---------------------------------------------------------------------------
call l9#defineVariableDefault('g:fuf_file_prompt' , '>File[]>')
call l9#defineVariableDefault('g:fuf_file_switchOrder', 20)
call l9#defineVariableDefault('g:fuf_file_exclude' , '\v\~$|\.(o|exe|dll|bak|orig|sw[po])$|(^|[/\\])\.(hg|git|bzr)($|[/\\])')
"---------------------------------------------------------------------------
call l9#defineVariableDefault('g:fuf_coveragefile_prompt' , '>CoverageFile[]>')
call l9#defineVariableDefault('g:fuf_coveragefile_switchOrder', 30)
call l9#defineVariableDefault('g:fuf_coveragefile_exclude' , '\v\~$|\.(o|exe|dll|bak|orig|sw[po])$|(^|[/\\])\.(hg|git|bzr)($|[/\\])')
call l9#defineVariableDefault('g:fuf_coveragefile_globPatterns', ['**/.*', '**/*'])
"---------------------------------------------------------------------------
call l9#defineVariableDefault('g:fuf_dir_prompt' , '>Dir[]>')
call l9#defineVariableDefault('g:fuf_dir_switchOrder', 40)
call l9#defineVariableDefault('g:fuf_dir_exclude' , '\v(^|[/\\])\.(hg|git|bzr)($|[/\\])')
"---------------------------------------------------------------------------
call l9#defineVariableDefault('g:fuf_mrufile_prompt' , '>MRU-File[]>')
call l9#defineVariableDefault('g:fuf_mrufile_switchOrder', 50)
call l9#defineVariableDefault('g:fuf_mrufile_exclude' , '\v\~$|\.(o|exe|dll|bak|orig|sw[po])$|^(\/\/|\\\\|\/mnt\/|\/media\/)')
call l9#defineVariableDefault('g:fuf_mrufile_maxItem' , 200)
call l9#defineVariableDefault('g:fuf_mrufile_maxItemDir' , 50)
call l9#defineVariableDefault('g:fuf_mrufile_keyExpand' , '<C-]>')
"---------------------------------------------------------------------------
call l9#defineVariableDefault('g:fuf_mrucmd_prompt' , '>MRU-Cmd[]>')
call l9#defineVariableDefault('g:fuf_mrucmd_switchOrder', 60)
call l9#defineVariableDefault('g:fuf_mrucmd_exclude' , '^$')
call l9#defineVariableDefault('g:fuf_mrucmd_maxItem' , 200)
"---------------------------------------------------------------------------
call l9#defineVariableDefault('g:fuf_bookmarkfile_prompt' , '>Bookmark-File[]>')
call l9#defineVariableDefault('g:fuf_bookmarkfile_switchOrder', 70)
call l9#defineVariableDefault('g:fuf_bookmarkfile_searchRange', 400)
call l9#defineVariableDefault('g:fuf_bookmarkfile_keyDelete' , '<C-]>')
"---------------------------------------------------------------------------
call l9#defineVariableDefault('g:fuf_bookmarkdir_prompt' , '>Bookmark-Dir[]>')
call l9#defineVariableDefault('g:fuf_bookmarkdir_switchOrder', 80)
call l9#defineVariableDefault('g:fuf_bookmarkdir_keyDelete' , '<C-]>')
"---------------------------------------------------------------------------
call l9#defineVariableDefault('g:fuf_tag_prompt' , '>Tag[]>')
call l9#defineVariableDefault('g:fuf_tag_switchOrder', 90)
"---------------------------------------------------------------------------
call l9#defineVariableDefault('g:fuf_buffertag_prompt' , '>Buffer-Tag[]>')
call l9#defineVariableDefault('g:fuf_buffertag_switchOrder', 100)
call l9#defineVariableDefault('g:fuf_buffertag_ctagsPath' , 'ctags')
"---------------------------------------------------------------------------
call l9#defineVariableDefault('g:fuf_taggedfile_prompt' , '>Tagged-File[]>')
call l9#defineVariableDefault('g:fuf_taggedfile_switchOrder', 110)
"---------------------------------------------------------------------------
call l9#defineVariableDefault('g:fuf_jumplist_prompt' , '>Jump-List[]>')
call l9#defineVariableDefault('g:fuf_jumplist_switchOrder', 120)
"---------------------------------------------------------------------------
call l9#defineVariableDefault('g:fuf_changelist_prompt' , '>Change-List[]>')
call l9#defineVariableDefault('g:fuf_changelist_switchOrder', 130)
"---------------------------------------------------------------------------
call l9#defineVariableDefault('g:fuf_quickfix_prompt' , '>Quickfix[]>')
call l9#defineVariableDefault('g:fuf_quickfix_switchOrder', 140)
"---------------------------------------------------------------------------
call l9#defineVariableDefault('g:fuf_line_prompt' , '>Line[]>')
call l9#defineVariableDefault('g:fuf_line_switchOrder', 150)
"---------------------------------------------------------------------------
call l9#defineVariableDefault('g:fuf_help_prompt' , '>Help[]>')
call l9#defineVariableDefault('g:fuf_help_switchOrder', 160)
"---------------------------------------------------------------------------
command! -bang -narg=0 FufEditDataFile call fuf#editDataFile()
command! -bang -narg=0 FufRenewCache call s:renewCachesOfAllModes()
"---------------------------------------------------------------------------
call fuf#addMode('buffer')
call fuf#addMode('file')
call fuf#addMode('coveragefile')
call fuf#addMode('dir')
call fuf#addMode('mrufile')
call fuf#addMode('mrucmd')
call fuf#addMode('bookmarkfile')
call fuf#addMode('bookmarkdir')
call fuf#addMode('tag')
call fuf#addMode('buffertag')
call fuf#addMode('taggedfile')
call fuf#addMode('jumplist')
call fuf#addMode('changelist')
call fuf#addMode('quickfix')
call fuf#addMode('line')
call fuf#addMode('help')
call fuf#addMode('givenfile')
call fuf#addMode('givendir')
call fuf#addMode('givencmd')
call fuf#addMode('callbackfile')
call fuf#addMode('callbackitem')
"---------------------------------------------------------------------------
endfunction
"
function s:renewCachesOfAllModes()
for m in fuf#getModeNames()
call fuf#{m}#renewCache()
endfor
endfunction
" }}}1
"=============================================================================
" INITIALIZATION {{{1
call s:initialize()
" }}}1
"=============================================================================
" vim: set fdm=marker:

2041
.vim/plugin/fugitive.vim Normal file

File diff suppressed because it is too large Load Diff

135
.vim/plugin/po.vim Normal file
View File

@ -0,0 +1,135 @@
" Vim syntax file
" Language: po (gettext)
" Maintainer: Dwayne Bailey <dwayne@translate.org.za>
" Last Change: 2008 Jan 08
" Contributors: Dwayne Bailey (Most advanced syntax highlighting)
" Leonardo Fontenelle (Spell checking)
" Nam SungHyun <namsh@kldp.org> (Original maintainer)
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
syn sync minlines=10
" Identifiers
syn match poStatementMsgCTxt "^msgctxt"
syn match poStatementMsgidplural "^msgid_plural" contained
syn match poPluralCaseN "[0-9]" contained
syn match poStatementMsgstr "^msgstr\(\[[0-9]\]\)" contains=poPluralCaseN
" Simple HTML and XML highlighting
syn match poHtml "<\_[^<>]\+>" contains=poHtmlTranslatables,poLineBreak
syn match poHtmlNot +"<[^<]\+>"+ms=s+1,me=e-1
syn region poHtmlTranslatables start=+\(abbr\|alt\|content\|summary\|standby\|title\)=\\"+ms=e-1 end=+\\"+ contained contains=@Spell
syn match poLineBreak +"\n"+ contained
" Translation blocks
syn region poMsgCTxt matchgroup=poStatementMsgCTxt start=+^msgctxt "+rs=e-1 matchgroup=poStringCTxt end=+^msgid "+me=s-1 contains=poStringCTxt
syn region poMsgID matchgroup=poStatementMsgid start=+^msgid "+rs=e-1 matchgroup=poStringID end=+^msgstr\(\|\[[\]0\[]\]\) "+me=s-1 contains=poStringID,poStatementMsgidplural,poStatementMsgid
syn region poMsgSTR matchgroup=poStatementMsgstr start=+^msgstr\(\|\[[\]0\[]\]\) "+rs=e-1 matchgroup=poStringSTR end=+\n\n+me=s-1 contains=poStringSTR,poStatementMsgstr
syn region poStringCTxt start=+"+ skip=+\\\\\|\\"+ end=+"+
syn region poStringID start=+"+ skip=+\\\\\|\\"+ end=+"+ contained
\ contains=poSpecial,poFormat,poCommentKDE,poPluralKDE,poKDEdesktopFile,poHtml,poAcceleratorId,poHtmlNot,poVariable
syn region poStringSTR start=+"+ skip=+\\\\\|\\"+ end=+"+ contained
\ contains=@Spell,poSpecial,poFormat,poHeaderItem,poCommentKDEError,poHeaderUndefined,poPluralKDEError,poMsguniqError,poKDEdesktopFile,poHtml,poAcceleratorStr,poHtmlNot,poVariable
" Header and Copyright
syn match poHeaderItem "\(Project-Id-Version\|Report-Msgid-Bugs-To\|POT-Creation-Date\|PO-Revision-Date\|Last-Translator\|Language-Team\|MIME-Version\|Content-Type\|Content-Transfer-Encoding\|Plural-Forms\|X-Generator\): " contained
syn match poHeaderUndefined "\(PACKAGE VERSION\|YEAR-MO-DA HO:MI+ZONE\|FULL NAME <EMAIL@ADDRESS>\|LANGUAGE <LL@li.org>\|CHARSET\|ENCODING\|INTEGER\|EXPRESSION\)" contained
syn match poCopyrightUnset "SOME DESCRIPTIVE TITLE\|FIRST AUTHOR <EMAIL@ADDRESS>, YEAR\|Copyright (C) YEAR Free Software Foundation, Inc\|YEAR THE PACKAGE\'S COPYRIGHT HOLDER\|PACKAGE" contained
" Translation comment block including: translator comment, automatic coments, flags and locations
syn match poComment "^#.*$"
syn keyword poFlagFuzzy fuzzy contained
syn match poCommentTranslator "^# .*$" contains=poCopyrightUnset
syn match poCommentAutomatic "^#\..*$"
syn match poCommentSources "^#:.*$"
syn match poCommentFlags "^#,.*$" contains=poFlagFuzzy
" Translations (also includes header fields as they appear in a translation msgstr)
syn region poCommentKDE start=+"_: +ms=s+1 end="\\n" end="\"\n^msgstr"me=s-1 contained
syn region poCommentKDEError start=+"\(\|\s\+\)_:+ms=s+1 end="\\n" end=+"\n\n+me=s-1 contained
syn match poPluralKDE +"_n: +ms=s+1 contained
syn region poPluralKDEError start=+"\(\|\s\+\)_n:+ms=s+1 end="\"\n\n"me=s-1 contained
syn match poSpecial contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)"
syn match poFormat "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([diuoxXfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
syn match poFormat "%%" contained
" msguniq and msgcat conflicts
syn region poMsguniqError matchgroup=poMsguniqErrorMarkers start="#-#-#-#-#" end='#\("\n"\|\)-\("\n"\|\)#\("\n"\|\)-\("\n"\|\)#\("\n"\|\)-\("\n"\|\)#\("\n"\|\)-\("\n"\|\)#\("\n"\|\)\\n' contained
" Obsolete messages
syn match poObsolete "^#\~.*$"
" KDE Name= handling
syn match poKDEdesktopFile "\"\(Name\|Comment\|GenericName\|Description\|Keywords\|About\)="ms=s+1,me=e-1
" Accelerator keys - this messes up if the preceding or following char is a multibyte unicode char
syn match poAcceleratorId contained "[^&_~][&_~]\(\a\|\d\)[^:]"ms=s+1,me=e-1
syn match poAcceleratorStr contained "[^&_~][&_~]\(\a\|\d\)[^:]"ms=s+1,me=e-1 contains=@Spell
" Variables simple
syn match poVariable contained "%\d"
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_po_syn_inits")
if version < 508
let did_po_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink poCommentSources PreProc
HiLink poComment Comment
HiLink poCommentAutomatic Comment
HiLink poCommentTranslator Comment
HiLink poCommentFlags Special
HiLink poCopyrightUnset Todo
HiLink poFlagFuzzy Todo
HiLink poObsolete Comment
HiLink poStatementMsgid Statement
HiLink poStatementMsgstr Statement
HiLink poStatementMsgidplural Statement
HiLink poStatementMsgCTxt Statement
HiLink poPluralCaseN Constant
HiLink poStringCTxt Comment
HiLink poStringID String
HiLink poStringSTR String
HiLink poCommentKDE Comment
HiLink poCommentKDEError Error
HiLink poPluralKDE Comment
HiLink poPluralKDEError Error
HiLink poHeaderItem Identifier
HiLink poHeaderUndefined Todo
HiLink poKDEdesktopFile Identifier
HiLink poHtml Identifier
HiLink poHtmlNot String
HiLink poHtmlTranslatables String
HiLink poLineBreak String
HiLink poFormat poSpecial
HiLink poSpecial Special
HiLink poAcceleratorId Special
HiLink poAcceleratorStr Special
HiLink poVariable Special
HiLink poMsguniqError Special
HiLink poMsguniqErrorMarkers Comment
delcommand HiLink
endif
let b:current_syntax = "po"
" vim:set ts=8 sts=2 sw=2 noet:

4546
.vim/plugin/taglist.vim Normal file

File diff suppressed because it is too large Load Diff

88
.vim/syntax/nerdtree.vim Normal file
View File

@ -0,0 +1,88 @@
let s:tree_up_dir_line = '.. (up a dir)'
"NERDTreeFlags are syntax items that should be invisible, but give clues as to
"how things should be highlighted
syn match NERDTreeFlag #\~#
syn match NERDTreeFlag #\[RO\]#
"highlighting for the .. (up dir) line at the top of the tree
execute "syn match NERDTreeUp #\\V". s:tree_up_dir_line ."#"
"highlighting for the ~/+ symbols for the directory nodes
syn match NERDTreeClosable #\~\<#
syn match NERDTreeClosable #\~\.#
syn match NERDTreeOpenable #+\<#
syn match NERDTreeOpenable #+\.#he=e-1
"highlighting for the tree structural parts
syn match NERDTreePart #|#
syn match NERDTreePart #`#
syn match NERDTreePartFile #[|`]-#hs=s+1 contains=NERDTreePart
"quickhelp syntax elements
syn match NERDTreeHelpKey #" \{1,2\}[^ ]*:#hs=s+2,he=e-1
syn match NERDTreeHelpKey #" \{1,2\}[^ ]*,#hs=s+2,he=e-1
syn match NERDTreeHelpTitle #" .*\~#hs=s+2,he=e-1 contains=NERDTreeFlag
syn match NERDTreeToggleOn #".*(on)#hs=e-2,he=e-1 contains=NERDTreeHelpKey
syn match NERDTreeToggleOff #".*(off)#hs=e-3,he=e-1 contains=NERDTreeHelpKey
syn match NERDTreeHelpCommand #" :.\{-}\>#hs=s+3
syn match NERDTreeHelp #^".*# contains=NERDTreeHelpKey,NERDTreeHelpTitle,NERDTreeFlag,NERDTreeToggleOff,NERDTreeToggleOn,NERDTreeHelpCommand
"highlighting for readonly files
syn match NERDTreeRO #.*\[RO\]#hs=s+2 contains=NERDTreeFlag,NERDTreeBookmark,NERDTreePart,NERDTreePartFile
"highlighting for sym links
syn match NERDTreeLink #[^-| `].* -> # contains=NERDTreeBookmark,NERDTreeOpenable,NERDTreeClosable,NERDTreeDirSlash
"highlighing for directory nodes and file nodes
syn match NERDTreeDirSlash #/#
syn match NERDTreeDir #[^-| `].*/# contains=NERDTreeLink,NERDTreeDirSlash,NERDTreeOpenable,NERDTreeClosable
syn match NERDTreeExecFile #[|` ].*\*\($\| \)# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark
syn match NERDTreeFile #|-.*# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile
syn match NERDTreeFile #`-.*# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile
syn match NERDTreeCWD #^[</].*$#
"highlighting for bookmarks
syn match NERDTreeBookmark # {.*}#hs=s+1
"highlighting for the bookmarks table
syn match NERDTreeBookmarksLeader #^>#
syn match NERDTreeBookmarksHeader #^>-\+Bookmarks-\+$# contains=NERDTreeBookmarksLeader
syn match NERDTreeBookmarkName #^>.\{-} #he=e-1 contains=NERDTreeBookmarksLeader
syn match NERDTreeBookmark #^>.*$# contains=NERDTreeBookmarksLeader,NERDTreeBookmarkName,NERDTreeBookmarksHeader
if exists("g:NERDChristmasTree") && g:NERDChristmasTree
hi def link NERDTreePart Special
hi def link NERDTreePartFile Type
hi def link NERDTreeFile Normal
hi def link NERDTreeExecFile Title
hi def link NERDTreeDirSlash Identifier
hi def link NERDTreeClosable Type
else
hi def link NERDTreePart Normal
hi def link NERDTreePartFile Normal
hi def link NERDTreeFile Normal
hi def link NERDTreeClosable Title
endif
hi def link NERDTreeBookmarksHeader statement
hi def link NERDTreeBookmarksLeader ignore
hi def link NERDTreeBookmarkName Identifier
hi def link NERDTreeBookmark normal
hi def link NERDTreeHelp String
hi def link NERDTreeHelpKey Identifier
hi def link NERDTreeHelpCommand Identifier
hi def link NERDTreeHelpTitle Macro
hi def link NERDTreeToggleOn Question
hi def link NERDTreeToggleOff WarningMsg
hi def link NERDTreeDir Directory
hi def link NERDTreeUp Directory
hi def link NERDTreeCWD Statement
hi def link NERDTreeLink Macro
hi def link NERDTreeOpenable Title
hi def link NERDTreeFlag ignore
hi def link NERDTreeRO WarningMsg
hi def link NERDTreeBookmark Statement
hi def link NERDTreeCurrentNode Search

206
.vimrc
View File

@ -2,22 +2,73 @@
" общие настройки " общие настройки
syntax on " включить подсветку синтаксиса syntax on " включить подсветку синтаксиса
set ts=8 " у меня табуляция (tabstop) 4 символа set ts=4 " у меня табуляция (tabstop) 4 символа
set tabstop=8 set tabstop=4
set shiftwidth=8 set shiftwidth=4
set textwidth=8 set textwidth=79
set tw=79
set colorcolumn=80,120,160
"set expandtab
set autoindent set autoindent
set tw=159
set copyindent set copyindent
" set expandtab "set background=dark " весьма важная штука! :)
set background=dark " весьма важная штука! :)
set lbr set lbr
set showcmd set showcmd
set nocompatible " обойдёмся без стандартного vi set nocompatible " обойдёмся без стандартного vi
set backspace=indent,eol,start set backspace=indent,eol,start
color desert set nofixendofline
colorscheme default
hi DiffAdd ctermfg=white
hi DiffChange ctermfg=white
hi DiffDelete ctermfg=white
hi DiffText ctermfg=white
set number set number
nmap <F6> :set invlist<cr> nmap <F6> :set invlist<cr>
" set breakindent " https://www.linux.org.ru/forum/general/10615635?lastmod=1403800233259
" https://ru.wikibooks.org/wiki/Vim#%D0%A1%D0%BF%D0%BE%D1%81%D0%BE%D0%B1_2
set langmap=ёйцукенгшщзхъфывапролджэячсмитьбю;`qwertyuiop[]asdfghjkl\\;'zxcvbnm\\,.,ЙЦУКЕHГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ;QWERTYUIOP{}ASDFGHJKL:\\"ZXCVBNM<>
" Setup for the GNU coding format standard
function! GnuIndent()
setlocal cinoptions=>4,n-2,{2,^-2,:2,=2,g0,h2,p5,t0,+2,(0,u0,w1,m1
setlocal shiftwidth=2
setlocal tabstop=4
endfunction
" Setup for the CPP coding format standard
function! CppIndent()
setlocal shiftwidth=2
setlocal tabstop=2
setlocal expandtab
set textwidth=119
set tw=119
set colorcolumn=120,160
endfunction
" Setup for the Sh coding format standard
function! ShIndent()
setlocal shiftwidth=4
setlocal tabstop=4
setlocal noexpandtab
endfunction
" Setup for the Vala coding format standard
function! ValaIndent()
setlocal shiftwidth=4
setlocal tabstop=4
setlocal noexpandtab
set textwidth=119
set tw=119
set colorcolumn=120,160
endfunction
hi ColorColumn ctermbg=lightgrey guibg=lightgrey
au FileType c call GnuIndent()
au FileType cpp call CppIndent()
au FileType vala,vapi call ValaIndent()
au FileType sh call ShIndent()
" отключение бэкапов " отключение бэкапов
set nobackup set nobackup
@ -62,12 +113,12 @@ imap <F10> <esc>:q!<cr>i
:set tabpagemax=99 :set tabpagemax=99
nmap <C-a> :tabnew<cr> nmap <C-a> :tabnew<cr>
imap <C-a> <ESC>:tabnew<cr> imap <C-a> <ESC>:tabnew<cr>
map <C-k> :tabnext<cr> map <C-x>n :tabnext<cr>
nmap <C-k> :tabnext<cr> nmap <C-x>n :tabnext<cr>
imap <C-k> :tabnext<cr> imap <C-x>n :tabnext<cr>
map <C-j> :tabprev<cr> map <C-x>p :tabprev<cr>
nmap <C-j> :tabprev<cr> nmap <C-x>p :tabprev<cr>
imap <C-j> :tabprev<cr> imap <C-x>p :tabprev<cr>
" кириллица " кириллица
set encoding=utf-8 set encoding=utf-8
@ -80,6 +131,7 @@ menu Encoding.CP866 :e ++enc=cp866<CR>
menu Encoding.KOI8-U :e ++enc=koi8-u<CR> menu Encoding.KOI8-U :e ++enc=koi8-u<CR>
menu Encoding.UTF-8 :e ++enc=utf-8<CR> menu Encoding.UTF-8 :e ++enc=utf-8<CR>
map <F8> :emenu Encoding.<TAB> map <F8> :emenu Encoding.<TAB>
set fileencodings=utf-8,cp1251,cp866,koi8-r
" вкл/выкл автоперенос " вкл/выкл автоперенос
set pastetoggle=<F5> set pastetoggle=<F5>
@ -105,14 +157,130 @@ function! ToggleMyFontSize()
endfunction endfunction
nnoremap <silent> <F12> :call ToggleMyFontSize()<CR> nnoremap <silent> <F12> :call ToggleMyFontSize()<CR>
" теги " ctags/cscope
set tags+=./.ctags let local_tags = ".ctags"
set tags+=~/.big/ctags let local_tags2 = "tags"
cscope add ./.cscope let local_cscope = ".cscope.out"
cscope add ~/.big/cscope let local_cscope2 = "cscope.out"
let local_path = "/"
let current_path = getcwd()
" If the current path is a child of $HOME directory, start from $HOME
if current_path =~ $HOME
let local_path = $HOME . local_path
let current_path = substitute(current_path, $HOME, '', "")
endif
let path_parts = split(current_path, "/")
for path_part in path_parts
let local_path = local_path . path_part . "/"
if filereadable(local_path . local_tags)
exe ":set tags+=" . local_path . local_tags
endif
if filereadable(local_path . local_tags2)
exe ":set tags+=" . local_path . local_tags2
endif
if filereadable(local_path . local_cscope)
exe "cs add" local_path . local_cscope
endif
if filereadable(local_path . local_cscope2)
exe "cs add" local_path . local_cscope2
endif
endfor
unlet local_tags local_tags2 local_cscope local_cscope2 local_path current_path path_parts
map <F4> [I:let nr = input("Which one: ")<Bar>exe "normal " . nr ."[\t"<CR> map <F4> [I:let nr = input("Which one: ")<Bar>exe "normal " . nr ."[\t"<CR>
" Foldging " Foldging
set foldenable set foldenable
set foldmethod=syntax set foldmethod=syntax
" VUNDLE "
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
" My Bundles here:
"
" original repos on github
Bundle 'tpope/vim-fugitive'
Bundle 'Lokaltog/vim-easymotion'
"Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
Bundle 'tpope/vim-rails.git'
" vim-scripts repos
Bundle 'L9'
Bundle 'FuzzyFinder'
Bundle 'vim-tags'
" non github repos
Bundle 'git://git.wincent.com/command-t.git'
" ...
Bundle 'majutsushi/tagbar'
Bundle 'vim-startify'
" Bundle 'clang-complete'
Bundle 'scrooloose/nerdcommenter'
" Bundle 'vim-scripts/OmniCppComplete'
filetype plugin indent on " required!
"
" Brief help
" :BundleList - list configured bundles
" :BundleInstall(!) - install(update) bundles
" :BundleSearch(!) foo - search(or refresh cache first) for foo
" :BundleClean(!) - confirm(or auto-approve) removal of unused bundles
"
" see :h vundle for more details or wiki for FAQ
" NOTE: comments after Bundle command are not allowed..
" clang_complete
" let g:clang_complete_copen = 1
" let g:clang_user_options='|| exit 0'
filetype plugin on
let g:clang_library_path="/usr/lib/llvm"
let g:clang_user_options='|| exit 0'
let g:clang_complete_auto = 1
let g:clang_complete_copen = 0
" ------- Vala --------
" Disable valadoc syntax highlight
"let vala_ignore_valadoc = 1
" Enable comment strings
let vala_comment_strings = 1
" Highlight space errors
let vala_space_errors = 1
" Disable trailing space errors
"let vala_no_trail_space_error = 1
" Disable space-tab-space errors
let vala_no_tab_space_error = 1
" Minimum lines used for comment syncing (default 50)
"let vala_minlines = 120
" ----- Vala taglist ------
" Work-around Tag List for Vala
let tlist_vala_settings='c#;d:macro;t:typedef;n:namespace;c:class;'.
\ 'E:event;g:enum;s:struct;i:interface;'.
\ 'p:properties;m:method'
" ----- TagBar ------
nmap <F9> :TagbarToggle<CR>
let g:tagbar_ctags_bin = "anjuta-tags"
" ----- NERDTree ------
nmap <F12> :NERDTreeToggle<CR>
" ------- VimDiff -------
if &diff
let mapleader = ","
map dp1 :diffput LOCAL<CR>
map dp2 :diffput BASE<CR>
map dp3 :diffput REMOTE<CR>
map do1 :diffget LOCAL<CR>
map do2 :diffget BASE<CR>
map do3 :diffget REMOTE<CR>
endif