Comments (22)
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.
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.
.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.
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.
@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.
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.
@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.
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.
Can you also do a gtm --version
from the command line and let me know the results? Thanks.
from gtm.
BTW, here's my dotfiles using "Plug".
from gtm.
- 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.
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.
Can you also tell me what you get when you run echom GTMStatusline()
within Vim?
from gtm.
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.
- I'm running OSX El Capitan 10.11.3
- I see
E117: Unknown function: GTMStatusline
E15: Invalid expression: GTMStatusline()
on runningechom GTMStatusline()
- What I posted was my entire
.vimrc
, its minimal. - Let me just load gtm and see if it works.
from gtm.
No Luck, will move to Plug.
from gtm.
Sorry to hear that, let me know if you have any questions about Plug and gtm.
from gtm.
@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.
@mschenk42 : Let me try this out now. Couldnt try out with Plug.
from gtm.
@mschenk42 : Its working with vim-pathogen now, thanks!
from gtm.
@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.
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)
- Get name of branch while report with summary format HOT 1
- Release for RPi; build info
- After an interactive rebase with squashing and commit reordering, we lose the time tracking data HOT 5
- `gtm commit` deletes pending time when a note for last commit already exists HOT 1
- Dashboard app for gtm HOT 1
- Panic in event.pathFromSource when doing record on quoted path ending with backslash
- Extracting time metrics from an existing repository ? HOT 4
- Startup Abort in Pycharm 2019.3 HOT 2
- GTM Listing Seconds as Minutes
- Nullpointer in IntelliJ
- FreeBSD 13.0-RELEASE compatibility HOT 2
- "gtm report -this-year" is listing times of a different git project
- GTM homebrew package does not support apple silicon HOT 2
- GTM killed: 9 on macos Ventura 13.0 HOT 3
- gtm appears to not work in a Cygwin environment
- Executing "gtm report" remain pending HOT 2
- Jira Smart Commits support HOT 11
- Support for tracking apps HOT 4
- [bug] `gtm status` does not respect `-terminal-off` HOT 3
- Squash merge and gtm? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gtm.