Giter Club home page Giter Club logo

Comments (22)

mschenk42 avatar mschenk42 commented on May 31, 2024 1

Can you try echom GTMStatusline() from within Vim? This shouldn't return an error if the plugin is installed.

I'm guessing the plugin is not being loaded. Can you also share the snippet from your .vimrc where you load the gtm plugin?

from gtm.

mschenk42 avatar mschenk42 commented on May 31, 2024

Can you check if you have a .gtm directory in the root of your git repo and then check if there are .event files being created as you open, save and navigate around within Vim. You should have new event files created at a minimum every 30 seconds when you are active in Vim.

Also try running gtm status.

Keep in mind there will be nothing to report on until you commit, otherwise you can look at work-in-progress with gtm status.

from gtm.

hackintoshrao avatar hackintoshrao commented on May 31, 2024

.gtm exists, but its empty and I don't see .event files being generated.

gtm status too shows empty result on code modifications.

from gtm.

gradymke avatar gradymke commented on May 31, 2024

What editor and plugin are you using to capture the "record" events? It very well could be that there is a problem with the plugin that we need to dive into.

from gtm.

hackintoshrao avatar hackintoshrao commented on May 31, 2024

@mschenk42 @gradymke , I followed the instructions here .

  • git clone https://github.com/git-time-metric/gtm ~/.vim/bundle/gtm

  • gtm init in my repo

  • Added the following configuration to vimrc ( I use Airline) .

    let g:gtm_plugin_status_enabled = 1

function! AirlineInit()
  if exists('*GTMStatusline')
    call airline#parts#define_function('gtmstatus', 'GTMStatusline')
    let g:airline_section_b = airline#section#create([g:airline_section_b, ' ', '[', 'gtmstatus', ']'])
  endif
endfunction
autocmd User AirlineAfterInit call AirlineInit()

from gtm.

mschenk42 avatar mschenk42 commented on May 31, 2024

I haven't tested using Pathogen to load gtm but I will sometime this evening to make sure the instructions work. The instructions assume Pathogen is already installed in your .vimrc and is working. Currently I'm using Plug to install gtm and not Pathogen.

Are you using Pathogen to install other plugins and is it working as expected?

from gtm.

hackintoshrao avatar hackintoshrao commented on May 31, 2024

@mschenk42 : Yes, I've been using pathogen from an year now, I've customized my vim editor using tens of packages installed via pathogen(including Airline).

Thanks for the help.

from gtm.

mschenk42 avatar mschenk42 commented on May 31, 2024

I tested with Pathogen and worked for me. Would you be able to share your .vimrc and tell me what version of Vim you are running? I'm currently running the latest release of neovim.

The only difference I have compared to the instructions is the name of gtm plugin directory. Here's what mine is.

❯ ls ~/.vim/bundle |grep gtm-vim-plugin
gtm-vim-plugin

from gtm.

mschenk42 avatar mschenk42 commented on May 31, 2024

Can you also do a gtm --version from the command line and let me know the results? Thanks.

from gtm.

mschenk42 avatar mschenk42 commented on May 31, 2024

BTW, here's my dotfiles using "Plug".

from gtm.

hackintoshrao avatar hackintoshrao commented on May 31, 2024
  • Vim version VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Oct 27 2015 16:22:14)
  • gtm version v1.0-beta.8
  • Here is my vimrc
execute pathogen#infect()
syntax on       
filetype plugin indent on

let mapleader=","

au FileType go nmap <leader>r <Plug>(go-run)
au FileType go nmap <leader>b <Plug>(go-build)
au FileType go nmap <leader>t <Plug>(go-test)
au FileType go nmap <leader>c <Plug>(go-coverage)
au FileType go nmap <Leader>gd <Plug>(go-doc)
au FileType go nmap <Leader>gv <Plug>(go-doc-vertical)
au FileType go nmap <Leader>s <Plug>(go-implements)au FileType go nmap <Leader>s <Plug>(go-implements)

set laststatus=2

let g:gtm_plugin_status_enabled = 1
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#branch#enabled = 1


function! AirlineInit()
          if exists('*GTMStatusline')
                call airline#parts#define_function('gtmstatus', 'GTMStatusline')
                let g:airline_section_b = airline#section#create([g:airline_section_b, ' ', '[', 'gtmstatus', ']'])
          endif
endfunction     
autocmd User AirlineAfterInit call AirlineInit()


set runtimepath^=~/.vim/bundle/ctrlp.vim


from gtm.

mschenk42 avatar mschenk42 commented on May 31, 2024

I tested Vim 7.3 with your same configuration. I have a lot of the same plugins so your .vimrc just worked fine for me. Here's the Vim version I tested.

VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Apr  5 2016 14:53:37)

What OS are you running?

from gtm.

mschenk42 avatar mschenk42 commented on May 31, 2024

Can you also tell me what you get when you run echom GTMStatusline() within Vim?

from gtm.

mschenk42 avatar mschenk42 commented on May 31, 2024

I'm leaning towards this might be a conflict with one of your other plugins. I believe you only sent a portion of your .vimrc. Is that correct?

If so, one way to determine this is just to load the gtm plugin and maybe airline to see if it works. If it does, then you can troubleshoot by adding other plugins back in one at a time.

from gtm.

hackintoshrao avatar hackintoshrao commented on May 31, 2024
  • I'm running OSX El Capitan 10.11.3
  • I see E117: Unknown function: GTMStatusline
    E15: Invalid expression: GTMStatusline() on running echom GTMStatusline()
  • What I posted was my entire .vimrc, its minimal.
  • Let me just load gtm and see if it works.

from gtm.

hackintoshrao avatar hackintoshrao commented on May 31, 2024

No Luck, will move to Plug.

from gtm.

mschenk42 avatar mschenk42 commented on May 31, 2024

Sorry to hear that, let me know if you have any questions about Plug and gtm.

from gtm.

mschenk42 avatar mschenk42 commented on May 31, 2024

@hackintoshrao this might be why you were having issues with installing via Pathogen,
see this issue git-time-metric/gtm-vim-plugin#2

from gtm.

hackintoshrao avatar hackintoshrao commented on May 31, 2024

@mschenk42 : Let me try this out now. Couldnt try out with Plug.

from gtm.

hackintoshrao avatar hackintoshrao commented on May 31, 2024

@mschenk42 : Its working with vim-pathogen now, thanks!

from gtm.

Graystripe17 avatar Graystripe17 commented on May 31, 2024

@hackintoshrao Hi, I'm using plug and have this same problem. Vim 8.0 on High Sierra. I have enabled gtm terminal as well and that works fine. gtm status is not blank anymore, but was before I added terminal plugin. gtm report lists my latest commit

set number

syntax on

colorscheme monokai

set mouse=a		" Mouse can navigate

set hlsearch		" Highlight search

set incsearch		" Highlight matches

"Turn off search highlight with ,<space>
nnoremap <leader>h :nohlsearch<CR>

" Note the change to 3 spaces for the stupid Java class
filetype plugin indent on

autocmd Filetype java setlocal tabstop=3 softtabstop=3 shiftwidth=3 expandtab " For Java

set tabstop=4		" Visual spaces per tab
set softtabstop=4	" Number of spaces in tab when editing
set expandtab		" Tabs are spaces

set showmatch		" Highlight matching [{()}]

set foldenable		" Enable folding

" Status line highlighting Monokai
" 272822 Sundried Clay
" F92672 Pink Orchard
" 66D9EF Bounded Rationality
" A6E22E Henn1nk
" FD971F Pumpkin Spice
hi StatusLine                  ctermfg=3          ctermbg=272822     cterm=NONE
hi StatusLineNC                ctermfg=272822     ctermbg=66D9EF     cterm=NONE

" Change cursor color
set cursorline
hi Cursor ctermbg=172
hi CursorLine ctermbg=18
hi CursorIM ctermbg=100
" Add jk to esc
:imap jk <Esc>
" Enable copying out
:vnoremap <C-c> :w !pbcopy<CR><CR>

call plug#begin('~/.vim/plugged')

Plug 'crusoexia/vim-monokai'
Plug 'pangloss/vim-javascript'
Plug 'git-time-metric/gtm-vim-plugin'

call plug#end()

from gtm.

mschenk42 avatar mschenk42 commented on May 31, 2024

Your config looks right for installing gtm using Plug. Are you still having issues? If so, please give examples of what issues you are seeing.

from gtm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.