README 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. Description:
  2. A word fuzzy completion plugin for vim.
  3. Requirement:
  4. +python vim support.
  5. Installation:
  6. Just download the file `wordfuzzycompletion.vim` into ~/.vim/plugins and then restart vim.
  7. Use mode:
  8. Put vim in insert mode and then you start typing, when you typed a part of a
  9. word press either Ctrl-x Ctrl-u or Ctrl-k to see the list of similar words in
  10. the current buffer and select one.
  11. If there are just one result, then the typed word is replaced.
  12. Example:
  13. Suppose that your buffer contains above text:
  14. ------------------------
  15. 1 The simpsons
  16. 2 Futurama
  17. 3 Back to the Future.
  18. 4 Features
  19. ~
  20. ------------------------
  21. then:
  22. 1) type
  23. sminsons<press Ctrl-k>
  24. word must be changed to:
  25. simpsons
  26. 2) type
  27. smi<press Ctrl-k>
  28. word must be changed to:
  29. simpsons
  30. 3) type
  31. furure<press Ctrl-k>
  32. word must be changed to:
  33. future
  34. 4) type
  35. Furu<press Ctrl-k>
  36. so, must be showed a list of similar words:
  37. Fururama
  38. Future
  39. Features
  40. NOTE: as it is the first version of plugin there are some bugs, so, you are
  41. welcome either to report them to me or fix them!.
  42. Customization:
  43. Certain things can be customized by the definition of some vim variables in
  44. your ~/.vimrc file.
  45. Variables:
  46. > g:fuzzywordcompletion_disable_keybinding:
  47. - Default:0
  48. - Details: This variable can be to used to tell the plugin that the '<Ctrl-k>'
  49. binding should not be mapped.
  50. Example:
  51. let g:fuzzywordcompletion_disable_keybinding=1
  52. > g:fuzzywordcompletion_maxresults:
  53. - Default: 10
  54. - Details: This variable has the control over the result list length.
  55. Yo can define this variable in the ~/.vimrc to change it.
  56. Example:
  57. let g:fuzzywordcompletion_maxresults=20
  58. >g:fuzzywordcompletion_completiontable:
  59. - Default: Preserves alphanumeric chars + '_'.
  60. - Details: This variable contains an array of 256 bytes that represents the
  61. translation table that will be used to split words. Each position should be
  62. completed with the char that will replace the pointed position.
  63. For example, if you want that words will be split with the '0' char, you
  64. must put a ' ' in the position 48 of the table ('0'=48 ascii).