Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Complete by attr_accessor/reader/writer
  • Loading branch information
Isty001 committed Jan 9, 2019
commit 9014a8c286778502bebcfcf3e5d08f7ad3f1536f
4 changes: 2 additions & 2 deletions autoload/rubycomplete.vim
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ rescue Exception
end
class VimRubyCompletion
# {{{ constants
@@debug = true
@@debug = false
@@ReservedWords = [
"BEGIN", "END",
"alias", "and",
Expand Down Expand Up @@ -360,7 +360,7 @@ class VimRubyCompletion
next if x == 0
ln = buf[x]
is_const = false
if /^\s*(module|class|def|include)\s+/.match(ln) || is_const = /^\s*?[A-Z]([A-z]|[1-9])*\s*?[|]{0,2}=\s*?.+\s*?/.match(ln) || /attr_(accessor|reader)/.match(ln)
if /^\s*(module|class|def|include)\s+/.match(ln) || is_const = /^\s*?[A-Z]([A-z]|[1-9])*\s*?[|]{0,2}=\s*?.+\s*?/.match(ln) || /attr_(accessor|reader|writer)/.match(ln)
clscnt += 1 if /class|module/.match($1)
# We must make sure to load each constant only once to avoid errors
if is_const
Expand Down