aboutsummaryrefslogtreecommitdiffstats
path: root/ftplugin
AgeCommit message (Collapse)Author
2019-06-01Add ftplugin/javascript.vimTeddy Wing
Don't preserve indentation on empty lines in JavaScript files.
2019-05-17ftplugin/go.vim: Add a mapping to run `goimports`Teddy Wing
Sometimes the run-on-save functionality doesn't work. This gives me a quick way to run the formatter when it doesn't happen automatically.
2019-05-17ftplugin/gitcommit.vim: Turn on spell checking in Git commitsTeddy Wing
2019-05-17ftplugin/go.vim: Add mapping to `:GoTestCompile`Teddy Wing
Make it faster to compile tests without running them.
2019-05-17ftplugin/go.vim: Make `go run` mapping run root main packageTeddy Wing
The `Plug` mapping wasn't finding my `main` package from a sub-package. Change it to force running for the main package in the `pwd` directory.
2019-05-10ftplugin/go.vim: Add a few mappings to Vim-GoTeddy Wing
Mappings to build projects and run tests.
2018-12-13ftplugin/objc.vim: Switch alternates on <C-^>Teddy Wing
Use FSwitch to swap .h and .m files in the current window when `<C-^>` is pressed.
2018-11-24ftplugin/todo.vim: Don't change highlighting of non-todo filesTeddy Wing
Previously, the custom highlighting I had added for TODO files would infect the highlighting of all other files in the same Vim session. Only change the highlighting of the `todoUndone` group so that it doesn't affect anything else.
2018-11-24Add ftplugin/dome_key.vimTeddy Wing
Use the plugin's ftplugin. This gives us the proper comment string.
2018-11-24Add ftplugin/make.vimTeddy Wing
Set the correct comment string for make.
2018-11-24Add ftplugin/objc{,pp}.vimTeddy Wing
Filetype plugins for Objective-C. Turns out editing ObjC in Vim is somewhat surprisingly whoppingly better than Xcode. This gets indentation set to 4-space tabs and sets the comment correct prefix (Tcomment forces /* ... */). Include `objcpp` also because ObjC header files get recognised by Vim as ObjC++.
2018-02-13ftplugin/mail.vim: Activate Vim's mail ftpluginTeddy Wing
I was using a different machine and composing an email, but there I wasn't getting a `textwidth` setting of 72. Instead it was unset. Ensure the default mail ftplugin gets sourced so we get the proper `textwidth`, plus some other niceties.
2017-12-05ftplugin/ruby.vim: Add mapping to reset the Rails test databaseTeddy Wing
Occasionally I need to drop and reload the Rails test database. Recently I've been working on something that requires a "truncation"-cleaned test, and have had to reset my database regularly while writing the test to eliminate inconsistent state. This command gives me the ability to reset with a single key press. I've been testing it out for a few days in a Vim session and have found it very helpful.
2017-12-05ftplugin/ruby.vim: Add `RubyNewHashSyntax` commandTeddy Wing
I've had to use a similar pattern a couple of times in the past to convert files or sections of files from the old Ruby hash syntax (`:key => 'value'`) to the new syntax (`key: 'value'`). Give the pattern and substitution a command to make it readily available the next time I need to use it.
2017-11-14Add ftplugin/slim.vimTeddy Wing
Ugh, I hate Slim. But I increasingly have to deal with it in projects. Fix what's within our power to fix, and give ourselves Ruby indentation in Slim files.
2017-09-22ftplugin/ruby.vim: Add command to stop SpringTeddy Wing
I love Spring, it makes it so much nicer to run tests in Rails apps. That's why I set 'vim-rspec' to use it. However, sometimes it gets confused and doesn't load the latest code, and a load error occurs. Recently I started a new project and those errors occur every few times I run the tests. It's absolutely unbearable. To make life a tiny bit easier, make a command that allows us to stop Spring from Vim, to avoid having to <C-z> and type the command by hand. You can tell I was frustrated when I decided to make this command.
2017-08-10Add ftplugin/haskell.vimTeddy Wing
Add syntax formatting settings for Haskell. Want 4-space tabs and a maximum of 80 characters per line. Using this style guide: https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md
2017-04-29Add ftplugin/gitcommit_gitcha.vimTeddy Wing
Unlet `b:did_ftplugin` to allow 'vim-gitcha' to work. By default we override `b:did_ftplugin` to disable filetype plugins, but here we want the ftplugin to work.
2017-03-09ftplugin/ruby.vim: Add maps to insert debug breakpointsTeddy Wing
Make it easier to insert `byebug` debug statements. Currently working in Rails so assuming `byebug` is already required. Might want to add new maps or modify these later if I end up needing to do a `require 'byebug'` beforehand. These keys didn't seem to be used for anything, so I figured they would be a nice quick combination for this. Didn't really feel like adding a long leader command to do it.
2017-03-05ftplugin/mail.vim: Don't start wrapped lines with '*'Teddy Wing
When writing bulleted lists, don't start wrapped lines with '*'. Just wrote a mail message an noticed this was a problem. Copied my gitcommit.vim config to resolve this.
2017-02-28Add CoffeeScript ftdetect & ftplugin filesTeddy Wing
Blech, CoffeeScript! Having to read & write some recently, so add support for it.
2017-02-22ftplugin/ruby.vim: Don't preserve indentation on empty linesTeddy Wing
My tastes have changed over time. These days I normally prefer to remove indentation on empty lines, and this is my general default working on codebases with other people. Change our Ruby config to remove indentation on empty lines so I don't have to keep doing it myself manually.
2017-02-07Create new filetype plugin 'htmlerb'Teddy Wing
I want the HTML matchit command to be available in *.html.erb files. Normally, these files get loaded as `filetype=eruby`. The trouble with that is that not all eruby is HTML, so I can't load the matcher in the 'eruby' filetype because it might not make sense. Create a new special filetype for *.html.erb files that uses the normal eruby syntax, but includes the HTML matchit command.
2016-12-09ftplugin/todo.vim: Set `nocursorline`Teddy Wing
Don't use a cursorline in TODO files because in my colour scheme it makes the text of normal priority to-dos unreadable as it overrides the line background so you end up with dark text on a dark background.
2016-11-28Add ftplugin/netrw.vimTeddy Wing
Override the `g:netrw_bufsettings` variable to make Netrw always open with line numbers. This should make it easier to navigate to a specific file in the tree. Copied the settings from the original value and changed `nonu` to `nu`. Following this Stack Overflow answer from Benoit to get this working: http://stackoverflow.com/questions/8730702/how-do-i-configure-vimrc-so-that-line-numbers-display-in-netrw-in-vim/8731175#8731175
2016-10-26Add ftplugin/todo.vimTeddy Wing
Special overrides for *.todo files. Here we unlet `b:did_ftplugin` to allow the plugin's ftplugin to execute. Normally, we override `b:did_ftplugin` to disable filetype functionality. In this case, though, we do want the ftplugin code that comes with vim-twodo to be loaded and useable. We also set a custom colour for regular todos that fits with our default twilight256 colour scheme.
2016-05-08ftplugin/mail.vim: Add a mapping to remove the last two linesTeddy Wing
I have two empty lines below my signature to add some space between my top-posted message and the quoted message of a reply below. When I start a new mail message, though, nothing is below my message, resulting in two empty lines at the bottom of my emails. Add a mapping to quickly remove these lines to save me from having to do it manually. Should save some time.
2016-04-27Add ftplugin/muttrc.vimTeddy Wing
Set the correct comment prefix for the Muttrc config language (`#`).
2016-04-17Add ftplugin/yaml.vimTeddy Wing
Set proper 2-space indentation for YAML files.
2016-04-06ftplugin/rust.vim: Don't preserve indentation on empty linesTeddy Wing
Don't think we should be doing this in Rust so taking away my default behaviour.
2016-03-27ftplugin/rust.vim: Add commentstringTeddy Wing
Set `// ` as the comment string for the Rust language (otherwise it defaults to `/* %s */`).
2016-03-26ftplugin/rust.vim: Use 4-space tabsTeddy Wing
According to http://doc.rust-lang.org/book/getting-started.html, the Rust convention is apparently 4-space indentation. Update our settings to match this.
2016-02-13ftplugin/go.vim: Don't preserve indentation on empty linesTeddy Wing
Go style (and `go fmt`) doesn't put indentation on empty lines, so for the sake of good Go, don't add indentation in this case.
2015-11-23ftplugin/go.vim: Add mapping for `go fmt`Teddy Wing
Provide a quick way to format the current file.
2015-08-25ftplugin/html.vim: Add `-` to `iskeyword` listTeddy Wing
Include hyphens in the `iskeyword` list so that CSS class names can be autocompleted. This should make things faster and hopefully save me from typing some long repetitive class names.
2015-08-13ftplugin/python.vim: Add mapping to flake8Teddy Wing
Add a mapping to flake8 the current file for PEP8 syntax violations so I don't have to type out the path of a file that I already have open in order to check it against flake8.
2015-03-17ftplugin/mail.vim: Set nojoinspacesTeddy Wing
Noticed when writing emails that when a line ends with a period, two spaces are added after it, meaning there are now two spaces between my sentences. Personally I hate this practise even though I understand why it makes sense when using fixed-width typefaces. Set nojoinspaces to make it stop happening.
2015-01-28ftplugin/mail.vim: Turn on spell checkingTeddy Wing
It's useful to have spell checking on when writing emails.
2015-01-27Add ftplugin/mail.vimTeddy Wing
Add formatoptions for composing email messages. Using a recommendation from here: http://wcm1.web.rice.edu/mutt-tips.html regarding format=flowed emails.
2015-01-24Create ftplugin/eruby.vim with indentation settingsTeddy Wing
Looks like ERB files would take their indentation settings from the ruby setting (2 spaces). I want 4-space indentation in my ERB, at least typically that's what I want when I'm writing HTML with embedded ruby. Apply that accordingly.
2015-01-15ftplugin/python.vim: Add map to quickly insert debug statementTeddy Wing
Create a python-specific map (<leader>gdo and <leader>gdO) that inserts import ipdb; ipdb.set_trace() either above or below the current line. I got tired of having to type it all the time.
2014-11-18ftplugin/python.vim: Set textwidth to 79 columnsTeddy Wing
Comply with PEP8 style guidelines by setting a max line width of 79 columns). Should make it easier to write Python code without having to watch the column count myself.
2014-11-06ftplugin/gitcommit.vim: Don't start wrapped lines with '*'Teddy Wing
When making bulleted lists in git commits, I normally use '*' as the bullet character. When my text wrapped from the textwidth=72 setting for gitcommit-type files, the line following the start of a bullet would begin with a bullet. Obviously this is the wrong behaviour since I'm continuing a list item, not of starting a new one. This frustrated me to no end whenever I wrote a list in a git commit, constantly having to `0r<space>` to fix the extra asterisks. I finally decided to solve this problem once and for all. Read up a little on: * :h formatoptions * :h fo-table * :h format-comments The last of which gave me what I needed to fix the problem. Now asterisks in git commits behave as list bullets.
2014-07-02Add ftplugin/{html.vim,htmldjango.vim}Teddy Wing
Gives me matchit plugin settings for HTML and Django templates without including the entire ftplugin for either. Copied the settings from vim's default ftplugins. Allows me to use matchit to jump between HTML tags and <:>.
2014-06-14Add ftplugin/go.vimTeddy Wing
Include basic settings plus compiler mappings. Mappings facilitate compiling and running Go programs.
2014-05-23Add ftplugin/ruby for Ruby indentation settingsTeddy Wing
Set two space indentation for Ruby.
2014-05-23ftplugin/gitcommit: set textwidth=72Teddy Wing
Actually enjoyed the textwidth setting of the default gitcommit ftplugin so bringing that over to my custom one.
2014-05-23vimrc: move gitcommit settings to ftpluginTeddy Wing
Move gitcommit indentation settings from vimrc to an ftplugin file. Keeps things more organised and makes for a cleaner vimrc.
2014-05-15vimrc: turn on filetype plugin & add python ftpluginTeddy Wing
* Ensure filetype plugin is on so that ftplugins get loaded * Add a filetype plugin for python with PEP8 indentation and cancel my custom mappings that preserve indentation on empty lines