Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View chrisbra's full-sized avatar
:octocat:
Most likely working

Christian Brabandt chrisbra

:octocat:
Most likely working
View GitHub Profile
@chrisbra
chrisbra / check_colors.vim
Last active December 5, 2017 21:54
Check Vim colorscheme
" This script tests a color scheme for some errors. Load the scheme and source
" this script. e.g. :e colors/desert.vim | :so test_colors.vim
" Will output possible errors.
func! Test_check_colors()
call cursor(1,1)
let err={}
" 1) Check g:colors_name is existing
if !search('\<\%(g:\)\?colors_name\>', 'cnW')
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=27395, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=27396, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=27397, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 859fbe8f7..048bf0da2 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -5176,6 +5176,8 @@ A jump table for the options with a short description can be found at |Q_op|.
Running into the limit often means that the pattern is very
inefficient or too complex. This may already happen with the pattern
"\(.\)*" on a very long line. ".*" works much better.
+ Might also happen, on redraw, when syntax rules try to match a complex
+ file structure.
From 24b4a451e95c58479ff84d2e169673db963cfebf Mon Sep 17 00:00:00 2001
From: Christian Brabandt <cb@256bit.org>
Date: Fri, 23 Jun 2017 11:09:43 +0200
Subject: [PATCH] Fix issue #1788
hitting ctrl-n in insert mode when the cursor is at the first position,
the order of completion items won't be that one as expected (e.g. the
order of words should be in the order of appearance in the buffer).
Internally, Vim decrements the cursor position by 1 byte so that the
@chrisbra
chrisbra / evalfunc.patch
Created April 20, 2017 16:20
Vim issue #1590
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 83bc8f379..884f4501c 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -7092,9 +7092,9 @@ shellescape({string} [, {special}]) *shellescape()*
{special}) when 'shell' contains "csh" in the tail. That is
because for csh and tcsh "!" is used for history replacement
even when inside single quotes.
- The <NL> character is also escaped. With a |non-zero-arg|
- {special} and 'shell' containing "csh" in the tail it's
" First, let's define an empty dictionary and assign it to the "palette"
" variable. The # is a separator that maps with the directory structure. If
" you get this wrong, Vim will complain loudly.
let g:airline#themes#dark_minimal#palette = {}
" First let's define some arrays. The s: is just a VimL thing for scoping the
" variables to the current script. Without this, these variables would be
" declared globally. Now let's declare some colors for normal mode and add it
" to the dictionary. The array is in the format:
" [ guifg, guibg, ctermfg, ctermbg, opts ]. See "help attr-list" for valid
func! SearchHighlight(timer) abort
if !v:hlsearch || mode() isnot 'n'
return
else
let cmd="\<c-\>\<c-n>:let v:hlsearch=0\<cr>\<c-l>"
sil call feedkeys(cmd, 'n')
endif
endfu
func! s:TimerHighlight() abort
:version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Oct 17 2016 20:39:57)
Included patches: 1-41
Compiled by chrisbra@debian
Huge version without GUI. Features included (+) or not (-):
+acl +cmdline_compl +digraphs +folding +langmap -mouseshape -mzscheme +python3/dyn +syntax -toolbar +writebackup
+arabic +cmdline_hist -dnd -footer +libcall +mouse_dec +netbeans_intg +quickfix +tag_binary +user_commands +X11
+autocmd +cmdline_info -ebcdic +fork() +linebreak +mouse_gpm +num64 +reltime +tag_old_static +vertsplit +xfontset
-balloon_eval +comments +emacs_tags +gettext +lispindent -mouse_jsbterm +packages +rightleft -tag_any_white +virtualedit -xim
-browse +conceal +eval -hangul_input +listcmds +mouse_netterm +path_extra -rub
diff -r 405c0bba9d1d src/window.c
--- a/src/window.c Wed Jun 15 22:15:07 2016 +0200
+++ b/src/window.c Wed Jun 22 20:09:33 2016 +0200
@@ -4549,7 +4549,8 @@
#endif
#ifdef FEAT_PERL
- perl_win_free(wp);
+ if (wp->w_perl_private)
+ perl_win_free(wp);
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index f71c4ad..6b1b067 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -7374,7 +7374,8 @@ A jump table for the options with a short description can be found at |Q_op|.
By default, tag searches are case-sensitive. Case is ignored when
'ignorecase' is set and 'tagcase' is "followic", or when 'tagcase' is
- "ignore".
+ "ignore" or when 'tagcase' is "followscs" and 'smartcase' is set and