Age | Commit message (Collapse) | Author |
|
Make it easier to write with typographers' quotes.
Depends on 'vim-textobj-user'.
|
|
This plugin (specifically the `autoload/todo.vim` file) was colliding
with the 'vim-twodo' plugin, which uses the same file name.
Rename this plugin to prevent name conflicts.
|
|
Includes fixes and useful new features.
|
|
Previously, if the cursor was on a commit line and not at the start of
the line, the `[[` command would move to the start of the current line:
commit 7a06e3db5d7a47a05558dd6557f23e665cc26c39
^
*[[*
commit 7a06e3db5d7a47a05558dd6557f23e665cc26c39
^
This change causes the cursor to move correctly to the previous commit.
|
|
|
|
|
|
|
|
|
|
|
|
Add a plugin with mappings to move to the next and previous TODO.
Needs some cleanup and count support.
|
|
This includes a change that allows `gopls` to be disabled:
https://github.com/fatih/vim-go/commit/e3a0e1ead2c14aa27d1d34950c0c43a7b296e368
|
|
|
|
|
|
* Move functions into autoload
* Remove unused `s:Activate()` and `s:Deactivate()`. These were
development ideas.
* Add a load guard
|
|
A mapping that toggles <Space> to insert '\ ', automatically escaping
spaces when entering file names (such as when creating files with spaces
in their names).
Working, but I now need to clean up the code.
|
|
After trying a few different approaches, finally settled on a mapping
implementation for `c#` that seems to work both at the start and in the
middle of a word.
Previously, as the TODO on line 1 indicates, if the cursor was on the
start of the word, we'd move to the previous match using `c#`. However,
if the cursor was in the middle of the word, `c#` would move to the
start of the word, when it should instead move to the previous match.
First tried to solve the movement problem using `search()`. Managed to
find a formula that did what I wanted, but search highlighting isn't
applied when searching within functions. This function (in particular
the 'z' flag) allows us to move to the previous match even when starting
in the middle of the word:
call search('\C' . expand('<cword>'), 'bz')<CR>
I then tried an <expr> mapping against a function that would call:
call search('\<', 'bc')
first to move to the start of the word (even when already on the start
of the word), then return the `?...` command to run the search for the
previous match. This, however, didn't work because the above mentioned
`search()` call wasn't part of the <expr> mapping, and it's likely the
search was undone, similar to what I encountered next.
I then tried to run an `execute 'normal! ?...'` command to run the
search, preceded still by the aforementioned `search()` call to move to
the beginning of the word. This did not work because it turns out that
searches in a function are undone when that function returns:
:h function-search-undo
This behaviour is also the likely reason why my `search()` + <expr>
function didn't work.
Finally, tried an <expr> mapping containing both the `search()` call to
move to the beginning of the word and the `?...` command to search for
the previous match (all returned in the <expr> string). Once I got the
syntax right, this seems to do exactly what I want.
Left the in-between code states for reference. I'll be cleaning those up
later.
|
|
The printed commands were distracting.
|
|
Mappings for case sensitive versions # and *. Not completely figured out
yet.
|
|
Omaps for `[[` and `]]` commit motion commands.
|
|
An ftplugin that provides `[[` and `]]` mappings to move between commits
in `git log` output.
|
|
If the `:pwd` was a subdirectory of the repository root, the path in the
constructed GitHub URL would not include any subdirectories up to and
including the current working directory. This created an incorrect path
in the URL, resulting in a 404.
|
|
Thanks to Christian Brabandt
(https://vi.stackexchange.com/users/71/christian-brabandt) for
describing better autocmds for detecting diff mode:
https://vi.stackexchange.com/questions/12847/automatically-disable-cursorline-when-in-diff-mode/12852#12852
And for making the patch
(https://github.com/vim/vim/commit/04f62f881c5743d2fdaf7324f6a715381f0d5fcf)
that allows diff mode to be detected with the OptionSet event.
|
|
Plugin that opens a window containing the text formatting guide for
Jira.
The guide is taken from:
$ w3m -dump 'https://jira.atlassian.com/secure/WikiRendererHelpAction.jspa?section=all'
Since I'm using the go-jira CLI, I need the reference for any special
formatting I want to use. I figured it would help to have that
information right next to my Vim buffer instead of having to switch to a
browser and open the web page.
|
|
Soft wrap in diffs. Recently encountered diffs with super long lines and
thought it would be nice to be able to see everything on one page
without having to scroll horizontally.
|
|
Add a mapping to quickly close a tab. Makes it easier to close files
that I've finished reviewing.
Thanks to user9433424
(https://vi.stackexchange.com/users/6960/user9433424) on the Vi Stack
Exchange for the very detailed explanation of how to restore a mapping:
https://vi.stackexchange.com/questions/7734/how-to-save-and-restore-a-mapping/7735#7735
Using user9433424's mapping restore code, and ignoring the case where a
mapping is defined both globally and local to a buffer.
|
|
|
|
I wrote the `s:SaveCommentColor()` function using a lambda for
`filter()`ing. However, not all Vims have `lambda` support. And it
doesn't exist before Vim 7.4 I think. Use this guard to avoid causing
errors on startup for those Vims without lambdas.
|
|
|
|
When diff mode is deactivated, the old values for 'cursorline' and the
Comment highlight colour should be restored.
Thanks to Tony Mechelynck
(http://vim.1045645.n5.nabble.com/template/NamlServlet.jtp?macro=user_nodes&user=28373)
for the tip on how to save and restore highlight colours:
> The following is untested. It requires Vim version 7.
>
> function SaveCursorColor()
> redir => highlight
> silent hi Cursor
> redir END
> if highlight =~ 'links to '
> let s:hl-link = matchstr(highlight, 'links to \zs\S*')
> elseif highlight =~ '\<cleared\>'
> let s:hl-link = 'NONE'
> else
> let s:hl-link = ''
> for substr in ['term', 'cterm', 'ctermfg', 'ctermbg',
> \ 'gui', 'guifg', 'guibg', 'guisp']
> if highlight =~ substr . '='
> let s:hl-{substr} = matchstr(highlight,
> \ substr . '=\S*')
> else
> let s:hl-{substr} = ''
> endif
> endfor
> endif
> endfunction
> function RestoreCursorColor()
> if !exists('s:hl-link')
> echoerr 'Cursor not saved, cannot restore'
> return
> endif
> hi clear Cursor
> if s:hl-link == ''
> exe 'hi Cursor' s:hl-term s:hl-cterm s:hl-ctermfg
> \ s:hl-ctermbg s:hl-gui s:hl-guifg s:hl-guibg
> \ s:hl-guisp
> elseif hl-link != 'NONE'
> exe 'hi link Cursor' s:hl-link
> endif
> endfunction
>
>
> Best regards,
> Tony.
http://vim.1045645.n5.nabble.com/How-to-save-restore-the-hightlight-for-cursor-td1182624.html
|
|
The default is 10. Set it to a ridiculously large number so that we can
open one tab per file during a code review.
|
|
Makes the code a little nicer and more extensible without the line
continuations.
Only change the highlight colour for the 'twilight256' colour scheme.
|
|
* Changes `Comment` colour for better readability on red backgrounds.
* Turns of 'cursorline' so that diff background highlighting doesn't
get shadowed.
|
|
Now that I'm going to be doing more Go development, switch to the full
featured Vim Go plugin.
|
|
Switching to 'vim-go'.
|
|
For Courier Maildrop `.mailfilter` syntax highlighting. Makes it a bit
more pleasant to edit my new work email filters.
|
|
Includes visual and operator-pending mode mappings.
|
|
Makes switching to alternate files much more efficient. Will be using
this for Objective-C implementation and header files, but it could be
useful in other contexts, even outside the C realm.
|
|
|
|
Syntax highlighting for DomeKey mapping files.
|
|
The `:TabsGrep` command now takes a glob instead of a regex pattern.
|
|
Provides a `:TabsGrep` command that enables `:tabs` output to be
filtered, making it easier to find out which tab a file is on.
|
|
Previously all we did was `echo` the generated URL to the command line.
This was mainly for debugging purposes, but it strikes me that this
would be nice to keep so that users can validate that the correct URL
was generated.
In addition to doing this, though, we need to provide an easy way to
send that URL string into other programs like chat or an input field in
a web browser. Copy the URL to the Mac OS X clipboard to make it easier
to share.
|
|
If there's a diff in the index, that will get included in the output of
this command, meaning that just after the SHA, there will be a
multi-line diff string that completely messes up the constructed URL.
Use the `--no-patch` flag to suppress diff output.
|
|
Improve performance by eliminating the functions from the `plugin` file.
Also introduces a new `github_url#GitHubURL()` function that serves as
an entry point into the plugin.
Add a `g:loaded_github_url` check to prevent plugin re-sourcing and be a
good Vim citizen.
|
|
I used this for testing purposes but it's no longer relevant.
|
|
Add doc comments to these functions.
|
|
If the command was executed as:
:6GitHubFileURL
we previously appended `#L6-L6` to the URL. This change appends only
`#L6` in that case.
|
|
Using a `count` of 0 allows us to determine in `s:FileURL` whether a
range was given on the command line.
This count needs to be passed into the function explicitly with
`<count>`.
|
|
A rough working implementation of a plugin that generates a GitHub URL
for the current file.
It gets the base URL from the current Git repo's `origin` remote and
uses the current commit SHA. Lines can also be highlighted by passing a
range to the command.
This makes it easier to share a bit of code that I see in the editor
with other people on my team in chat or the issue tracker.
|
|
When the `<Enter>` key is pressed in the GitBlamer window, run
`!git show` on the commit from the current cursor line of the blame.
This allows a changed line to be inspected in the context of its
original changeset. It also saves me time from my previous workflow:
cpe^Zgit show <Apple-P><Enter>
|