             query = query_before_cursor.slice slice_index
             
             @query_first_part = query_before_cursor.slice 0, slice_index
-            ###
-            #TODO handle string
-            next_dot_position = query_after_cursor.indexOf('.')
-            next_parenthesis_position = query_after_cursor.indexOf(')')
-            if next_dot_position is -1 and next_parenthesis_position is -1
-                @query_last_part = ''
-            else
-                if next_dot_position is -1
-                    slice_position = next_parenthesis_position
-                else if next_parenthesis_position is -1
-                    slice_position = next_dot_position
-                else
-                    slice_position = Math.min next_dot_position, next_parenthesis_position
-
-                @query_last_part = query_after_cursor.slice slice_position
-                slice_position--
-                while query_after_cursor[slice_position]? and /\s/.test(query_after_cursor[slice_position])
-                    @query_last_part = query_after_cursor[slice_position] + @query_last_part
-                    slice_position--
-            ###
-            ###
-            slice_position = 0
-            while query_after_cursor[slice_position]? and /\s/.test(query_after_cursor[slice_position])
-                slice_position++
-            ###
+            # We might want to use tab to move faster (like w in vim)
             @query_last_part = query_after_cursor #.slice slice_position
 
             last_function = @extract_last_function(query)

                start_line_index = 0
            else
                start_line_index += 1

            @cursor =
                line: saved_cursor.line
                ch: (@query_first_part + @current_completed_query + suggestion_to_write).length - start_line_index

            setTimeout @position_cursor_after_click, 1 # Ugliest hack ever.


        suggestions:
            stream: [
                {
                    suggestion: 'get()'
                    description: 'get( id )'
                    has_argument: true
                }
                {
                    suggestion: 'filter()'
                    description: 'filter( predicate )'
                    has_argument: true
                }
                {
                    suggestion: 'length()'
                    description: 'length()'
                    has_argument: false
                }
                {
                    suggestion: 'map()'
                    description: 'map( attribute )'
                    has_argument: true
                }
                {
                    suggestion: 'slice()'
                    description: 'slice( start, end )'
                    has_argument: true
                }
                {
                    suggestion: 'orderby()'
                    description: 'orderby( expression )'
                    has_argument: true
                }
                {
                    suggestion: 'distinct()'
                    description: 'distinct( expression )'
                    has_argument: true
                }
                {
                    suggestion: 'reduce()'
                    description: 'reduce( expression )'
                    has_argument: true
                }
                {
                    suggestion: 'pluck()'
                    description: 'pluck( expression )'
                    has_argument: true
                }
                {
                    suggestion: 'extend()'
                    description: 'extend( expression )'
                    has_argument: true
                }
            ]
            view:[
                {
                    suggestion: 'pluck()'
                    description: 'pluck( expression )'
                    has_argument: true
                }
            ]
            db:[
                {
                    suggestion: 'table()'
                    description: 'table( table_name )'
                    has_argument: true
                }
                {
                    suggestion: 'list()'
                    description: 'list()'
                    has_argument: false
                }
                {
                    suggestion: 'create()'
                    description: 'create( database_name, primary_datacenter_id )'
                    has_argument: true
                }
                {
                    suggestion: 'drop()'
                    description: 'drop()'
                    has_argument: false
                }
            ]
            table:[
                {
                    suggestion: 'insert()'
                    description: 'insert( document )'
                    has_argument: true
                }
                
            ]
            r:[
                {
                    suggestion: 'dbCreate()'
                    description: 'dbCreate( database_name, primary_datacenter )'
                    has_argument: true
                }
                {
                    suggestion: 'dbDrop()'
                    description: 'dbDrop( database_name )'
                    has_argument: true
                }
                {
                    suggestion: 'dbList()'
                    description: 'dbList()'
                    has_argument: false
                }
                {
                    suggestion: 'expr()'
                    description:'expr( expression )'
                    has_argument: true
                }
                {
                    suggestion: 'fn()'
                    description: 'fn( argument..., body )'
                    has_argument: true
                }
                {
                    suggestion: 'ifThenElse()'
                    description: 'ifThenElse( expression, callback_true, callback_false)'
                    has_argument: true
                }
                {
                    suggestion: 'let()'
                    description: 'let( arguments..., body)'
                    has_argument: true
                }

            ]
